Warning: include(test/test.html): failed to open stream: No such file or directory in /var/www/html/test.php on line 5
Warning: include(): Failed opening 'test/test.html' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/html/test.php on line 5
我实验 include("test.html")
工作正常
我的环境
CentOS 7
php version: 5.4.16 (cli)
Apache 2.4.6 (CentOS)
确认 文件夹test和文件名正确,初步推断可能是权限问题,做以下尝试:
先关 SElinux setenforce 0
, 问题依旧
尝试 chmod
修改 test 文件夹 test.php 和 test.html 为 777, 问题依旧
尝试 chown -R apache:apache /var/www/html
, 问题依旧
尝试 chown -R root:root /var/www/html
, 问题依旧
花了一整天在stackoverflow 和百度,谷歌搜索,但问题依旧
拜托大家帮帮我,我实在不知道这是什么问题。
相似问题