>  기사  >  백엔드 개발  >  php文件打开显示空白

php文件打开显示空白

WBOY
WBOY원래의
2016-06-06 20:14:232062검색

查看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으로 문의하세요.