0

$_server 'document_root'在我的项目中使用过它在我的本地主机上运行良好,但是当我将它上传到远程服务器时遇到了问题。访问此文件时出现此错误

Warning: include(D:\Hosting\4391629\htmlforevision/php/tab1.php) [function.include]: failed to open stream: No such file or directory in D:\Hosting\4391629\html\othersites\forevision\forevision\home\index.php on line 2

Warning: include() [function.include]: Failed opening 'D:\Hosting\4391629\htmlforevision/php/tab1.php' for inclusion (include_path='.;C:\php5\pear') in D:\Hosting\4391629\html\othersites\forevision\forevision\home\index.php on line 2

请帮我解决这个问题。是否与服务器有关以获得权限$_server['document_root']或应该使用任何其他语法。我已经用过$_server['http_host']__dir__等。请帮我解决这个问题...

4

1 回答 1

0

Are you not just missing the / after your document root. eg,

$_SERVER['DOCUMENT_ROOT].'/forevision/php/tab1.php';
于 2013-08-11T07:32:29.503 回答