Nginx 1.6.2 / PHP,限制网站php到/

时间:2017-05-10 15:25:13

标签: php nginx

  

警告:include(/functions.php):无法打开流:没有这样的文件   或第13行/home/sites/mywebsite/www/index.php中的目录

如何将php限制为www网站目录 / ,以便它不会回到 / home / sites / mywebsite / www /

Nginx 1.6.2 - Debian 8 - PHP版本5.6.30 - FPM / FastCGI

1 个答案:

答案 0 :(得分:0)

如果functions.php位于同一个目录中 - 请尝试此操作:

include __DIR__ . '/functions.php';