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

PHP
轻松实现用PHP编写PDF文档生成器(一)
轻松实现用PHP编写PDF文档生成器(二)
php下载文件,PHP下载文件源码
一行PHP代码检测字符中中文汉字个数
用PHP开发多任务应用程序
怎样用PHP实现网站防盗链
PHP.MVC之模板标签系统(一)
PHP.MVC之模板标签系统(二)
PHP.MVC之模板标签系统(三)
PHP.MVC之模板标签系统(五)
PHP.MVC之模板标签系统(四)
linux/unix下使用php来做守护进程
PHP多文件上传类,实现php多文件上传
PHP编实现程动态图像的创建
利用PHP伪造http头(referer)
常见的25个顶级PHP模板引擎
PHP生成带有雪花背景的验证码
PHP日常开发中常用的一些小技巧
PHP + MySQL 分表减低数据库压力
PHP的语言层面的优化和代码优化

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


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