我是服务器管理员和 PHP 的新手,所以我很抱歉。这个真的让我卡住了。我重新启动了 EC2 服务器,但仍然没有运气。
PHP 文件
<?php
require_once "System.php";
var_dump(class_exists('System', false));
?>
终端(有效)
[ec2-user@domU-12-31-39-10-26-22 current]$ php phpcheck.php
bool(true)
浏览器 - 它没有找到文件
Warning: require_once(System.php): failed to open stream: No such file or directory in /etc/httpd/opt/app/current/phpcheck.php on line 2 Fatal error: require_once(): Failed opening required 'System.php' (include_path='.:/home/ec2-user/pear/share/pear') in /etc/httpd/opt/app/current/phpcheck.php on line 2