Home  >  Article  >  Backend Development  >  php文件打开显示空白

php文件打开显示空白

WBOY
WBOYOriginal
2016-06-06 20:14:232065browse

查看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中把错误提示打开,开发模式下屏蔽错误信息就是给自己找麻烦。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn