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

PHP
用PHP脚本在Linux系统上读取输入和对文
PHP中register_globals引发的问题
PHP基础:安全基础IIS 6的PHP最佳配置
Web开发基础知识分享:Php基础知识了解
实例解析:PHP程序开发中的中文编码问题
PHP5程序中新增加日期(date)函数的常量
新手学堂:PHP服务器变量设置的方法介绍
如何正确理解PHP程序错误信息的表示含义
PHP程序百行代码快速构建简易聊天室方法
如何使用PHP程序开发高效的WEB网络系统
加速PHP动态网站 关于MySQL索引分析优化
教你如何在SQL Server数据库中加密数据
用PHP程序直接调用文本文件内容实例
使用php的zlib压缩和解压缩swf文件
升级PHP5的理由:PHP4和PHP5性能对比
解决php存取mysql 4.1乱码问题
FC 5 php 不可以连接远程mysql数据库
一个特别好的学习PHP引用返回的例子
热门看点:PHP 6新版发布前新特性大展望
开源新版NetBeans让PHP开发变得更加轻松

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


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