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

PHP
PHP高级OOP技术演示
PHP注入的安全规范
PHP魔法函数应用详解
在PHP中实现用户身份认证两种方法
关于PHP中for循环语句的几种变型
php对gzip文件或者字符串解压实例参考
PHP 构建语义 Web CRUD 操作
php任意图像裁剪成固定大小
PHP IDE程序 phpeclipse
PHP5中的PDO的使用和介绍
PHP中strtr和str_replace比较
PHP在特定目录中找特定类型的文件
PHP5环境下采用sqlite数据库开发小小总结
PHP5+APACHE2.2配置成功案例
深入浅析:用于MySQL的PHP XML类
PHP通过header实现文本文件的下载
PHP函数使用入门
如何在PHP中定义一个类
教你在PHP中使用全局变量
PHP+AJAX实现实时显示在线用户信息

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


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-08-14   浏览: 71 ::
收藏到网摘: 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权限是否打开,该权限决定了目录能否被浏览。