首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >PHP: include() Failed opening for inclusion, 错误?

PHP: include() Failed opening for inclusion, 错误?

提问于 2022-12-09 18:25:23
回答 0关注 0查看 172

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 和百度,谷歌搜索,但问题依旧

拜托大家帮帮我,我实在不知道这是什么问题。

回答

和开发者交流更多问题细节吧,去 写回答
相关文章

相似问题

相关问答用户
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档