IT猫扑网:您身边最放心的安全下载站! 最新更新|软件分类|软件专题|手机版|论坛转贴|软件发布

您当前所在位置:首页网络编程PHP编程 → php脚本中include文件报错解决方法

php脚本中include文件报错解决方法

时间:2015/6/28来源:IT猫扑网作者:网管联盟我要评论(0)

经常当php页面中利用include, require, require_once包含了一些其他位置的页面时,会出现错误,比如没有发现次页面,或者权限不允许等,可以根据以下方法来排除

1. 出现"未找到文件"类似的错误时候,检查include文件的位置是否正确,下面引用php手册页面的原话:

以下为引用的内容:

Files for including are first looked in include_path relative to the current working directory and then in the directory of the current script. E.g. if your include_path is libraries, current working directory is /www/, you included include/a.php and there is include "b.php" in that file, b.php is first looked in /www/libraries/ and then in /www/include/. If filename begins with ./ or ../, it is looked only in include_path relative to the current working directory.

2. 当出现permission deny 类似错误的时候,按以下方法排除

a) 检测被包含的文件读权限是否打开

b) 检测被包含的文件路径上的每个目录的x权限是否打开,该权限决定了目录能否被浏览。

关键词标签:解决,方法,文件,脚本,

相关阅读

文章评论
发表评论

热门文章 plsql developer怎么连接数据库-plsql deveplsql developer怎么连接数据库-plsql deve2021年最好用的10款php开发工具推荐2021年最好用的10款php开发工具推荐在 PHP 中使用命令行工具在 PHP 中使用命令行工具php应用程序安全防范技术研究php应用程序安全防范技术研究

相关下载

人气排行 详解ucenter原理及第三方应用程序整合思路、方法PHP中防止SQL注入攻击PHP会话Session的具体使用方法解析PHP运行出现Notice : Use of undefined constant 的解决办法CakePHP程序员必须知道的21条技巧PHP如何清空mySQL数据库PHP采集图片实例(PHP采集)plsql developer怎么连接数据库-plsql developer连接数据库方法