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

PHP
PHP的GD函数imagettftext()要注意默认字符编码
PHP下载CSS文件中的图片
PHP任意图像裁剪成固定大小
PHP实例解析:实现给上传图片加水印图案
网友分享:二十五个顶级PHP模板引擎整理
PHP开发搜索引擎技术全解析
基于MySQL数据库的UTF8中文网站全文检索的实现
使用PHP调用TinyURL API的方法
彻底杜绝PHP的session cookie错误
新手必看的PHP学习入门的一些基础知识
在HTML中利用js调用php的内容
有关 PHP 和 MySQL 时区的一点总结
菜鸟课堂:有效防御PHP木马攻击的技巧
配置PHP站点安全综合教程
基于UML的城轨列车超速防护系统建模
专家预言:PHP将比Java更受开发人员欢迎
PHP CLI模式下的多进程应用
PHP企业级应用之WebService续篇
用php定制404错误页面 并发信通知管理员
为Vista/Win08中的IIS7添加PHP支持

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


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