PHP 致命错误:require():打开所需的“template/header.phtml”失败(include_path='.:/usr/share/php')

时间:2020-12-20 00:22:35

标签: php filepath

我创建了一个网站并刚刚将其上传到虚拟主机上,但是当我尝试访问它时,我收到“此页面无法正常工作(HTTP 错误 500)”的消息,并且我是从错误日志文件中得到的,我明白这与文件路径有关,但我不知道如何解决。有人知道怎么解决吗?

[Sun Dec 20 00:18:28.000823 2020] [fcgid:warn] [pid 2449] [client 89.168.52.229:52594] mod_fcgid: stderr: PHP Warning:  require(/home/ae504/public_html/AuctionSystem/View/Template/header.phtml): failed to open stream: No such file or directory in /home/aee504/public_html/AuctionSystem/View/index.phtml on line 1
[Sun Dec 20 00:18:28.000849 2020] [fcgid:warn] [pid 2449] [client 89.168.52.229:52594] mod_fcgid: stderr: PHP Stack trace:
[Sun Dec 20 00:18:28.000853 2020] [fcgid:warn] [pid 2449] [client 89.168.52.229:52594] mod_fcgid: stderr: PHP   1. {main}() /home/aee504/public_html/AuctionSystem/index.php:0
[Sun Dec 20 00:18:28.000856 2020] [fcgid:warn] [pid 2449] [client 89.168.52.229:52594] mod_fcgid: stderr: PHP   2. require_once() /home/aee504/public_html/AuctionSystem/index.php:5
[Sun Dec 20 00:18:28.000859 2020] [fcgid:warn] [pid 2449] [client 89.168.52.229:52594] mod_fcgid: stderr: PHP Fatal error:  require(): Failed opening required '/home/ae504/public_html/AuctionSystem/View/Template/header.phtml' (include_path='.:/usr/share/php') in /home/aee504/public_html/AuctionSystem/View/index.phtml on line 1
[Sun Dec 20 00:18:28.000862 2020] [fcgid:warn] [pid 2449] [client 89.168.52.229:52594] mod_fcgid: stderr: PHP Stack trace:
[Sun Dec 20 00:18:28.000865 2020] [fcgid:warn] [pid 2449] [client 89.168.52.229:52594] mod_fcgid: stderr: PHP   1. {main}() /home/aee504/public_html/AuctionSystem/index.php:0
[Sun Dec 20 00:18:28.000868 2020] [fcgid:warn] [pid 2449] [client 89.168.52.229:52594] mod_fcgid: stderr: PHP   2. require_once() /home/aee504/public_html/AuctionSystem/index.php:5

1 个答案:

答案 0 :(得分:0)

/home/ae504/public_html/AuctionSystem/View/Template/header.phtml

该文件不存在或不可读。简单的 *nix 错误

要么是您的模板引擎未生成它,要么正在生成但不可读。鉴于您的错误报告,无法判断。建议你去看看你正在使用的任何框架。