首頁 >後端開發 >php教程 >php文件打开显示空白

php文件打开显示空白

WBOY
WBOY原創
2016-06-06 20:14:232081瀏覽

查看nginx的日志错误信息如下:2016/03/22 18:59:40 [error] 20273#0: *11 FastCGI sent in stderr: "PHP message: PHP Warning: require_once(/home/dwj/phpblog/inc/../vendor/autoload.php): failed to open stream: No such file or directory in /home/dwj/phpblog/inc/blade.php on line 3
PHP message: PHP Fatal error: require_once(): Failed opening required '/home/dwj/phpblog/inc/../vendor/autoload.php' (include_path='.:/usr/share/php:/usr/share/pear') in /home/dwj/phpblog/inc/blade.php on line 3" while reading response header from upstream, client: 218.75.123.165, server: dwjdwj.cn, request: "GET /index.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "dwjdwj.cn"

个人感觉好像是路径问题,但是不知道该怎么改。求解答

回复内容:

查看nginx的日志错误信息如下:2016/03/22 18:59:40 [error] 20273#0: *11 FastCGI sent in stderr: "PHP message: PHP Warning: require_once(/home/dwj/phpblog/inc/../vendor/autoload.php): failed to open stream: No such file or directory in /home/dwj/phpblog/inc/blade.php on line 3
PHP message: PHP Fatal error: require_once(): Failed opening required '/home/dwj/phpblog/inc/../vendor/autoload.php' (include_path='.:/usr/share/php:/usr/share/pear') in /home/dwj/phpblog/inc/blade.php on line 3" while reading response header from upstream, client: 218.75.123.165, server: dwjdwj.cn, request: "GET /index.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "dwjdwj.cn"

个人感觉好像是路径问题,但是不知道该怎么改。求解答

用 function __autoload($class)

意思就是/home/dwj/phpblog/vendor/autoload.php这个文件不存在,你可能写错路径了。
另外,在php.ini中把错误提示打开,开发模式下屏蔽错误信息就是给自己找麻烦。

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn