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?
精彩评论