开发者

Path for file outside document root windows server

开发者 https://www.devze.com 2023-04-02 00:32 出处:网络
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?

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

精彩评论

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