开发者

Path for file outside document root windows server

I want to include a file one level up from document root. I am on a windows server 2003.

开发者_StackOverflow社区

I have tried both of the apporaches without success, any suggestions?

include("../inc/myfile.php");
inlcude("C:\Inetpub\vhosts\mysite.com\inc\myfile.php");


The latter would require backslashes to be escaped, so it would read:

include("C:\\Inetpub\\vhosts\\mysite.com\\inc\\myfile.php");

Being more specific about what isn't working would be helpful. Are you getting an error message? How is your PHP server configured? Are there any safe mode restrictions in place?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜