当前位置: 首页 > 图文教程 > 网络编程 > PHP > 动态网页PHP脚本中include文件报错解决方法

PHP
真正面向对象编程:PHP5.01发布
Zend公司全球首推PHP认证
使用MaxMind 根据IP地址对访问者定位
动态网站web开发 PHP、ASP还是ASP.NET
PHP5.0正式发布 不完全兼容PHP4 新增多项功能
PHP的一个完整SMTP类(解决邮件服务器需要验证时的问题)
提升PHP执行速度全攻略(上)
两种php调用Java对象的方法
PHP开发文件系统实例讲解
如何使用动态共享对象的模式来安装PHP
PHP编程网上资源导航
PHP安全编程之加密功能
PHP使用者状态管理功能的应用
用IE远程创建Mysql数据库的简易程序
phpBB BBcode处理的漏洞
一个目录遍历函数
生成缩略图
模拟xcopy的函数
PHP 中执行系统外部命令
PHP输出控制功能在简繁体转换中的应用

动态网页PHP脚本中include文件报错解决方法


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-08-14   浏览: 128 ::
收藏到网摘: n/a

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权限是否打开,该权限决定了目录能否被浏览。