路径详情:
first path : /httpdjail/var/www/html/seo_webcontent/
second path : /var/www/production/www.test.com
代码:
if(stripos($_SERVER['HTTP_HOST'],".localtest.com"))
{
$server_path = "/home/name/htdocs/new_website/"; // for local server
}
else
{
$server_path = "/httpdjail/var/www/html/seo_webcontent/";// for live server
}
我也试过下面的代码
if(stripos($_SERVER['HTTP_HOST'],".localtest.com"))
{
$server_path = $_SERVER["DOCUMENT_ROOT"]."new_website";
}
else
{
$server_path = $_SERVER["DOCUMENT_ROOT"]."/html/seo_webcontent";
}