基本上
file_get_contents('test.php')
完美无缺。但是,
file_get_contents('/../test.php')
结果为"file_get_contents(/../xx.php) [function.file-get-contents]: failed to open stream: No such file or directory"
目录结构正确。
答案 0 :(得分:3)
你说目录结构是正确的,但读起来仍然很奇怪:
file_get_contents('/../test.php')
如果没有前导斜杠,你确定它不应该如下:
file_get_contents('../test.php')