PHP脚本中include文件出错解决方法
2008-11-20 14:01
1021 查看
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权限是否打开,该权限决定了目录能否被浏览。
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权限是否打开,该权限决定了目录能否被浏览。
您可能感兴趣的文章:
相关文章推荐
- PHP脚本中include文件出错解决方法
- PHP脚本中include文件出错解决方法
- 网页中PHP脚本中include文件报错解决方法
- php脚本中include文件报错解决方法
- php命令行(cli)下执行PHP脚本文件的相对路径的问题解决方法
- php命令行(cli)下执行PHP脚本文件的相对路径的问题解决方法
- IIS7配置PHP5.5 对找不到的文件启用文件监视的解决方法[原创]_win服务器_脚本之家
- php ci框架中载入css和js文件失败的原因及解决方法
- 复制I386文件出错时解决方法
- setContentView()调用SurfaceView布局文件出错的解决方法
- PHP 获取远程文件大小的3种解决方法
- php多次include后导致全局变量global失效的解决方法
- sh文件在windows下修改后无法执行的解决方法以及shell脚本中含中文乱码
- XML解析文件出错解决方法
- php 文件下载 出现下载文件内容乱码损坏的解决方法(推荐)
- Apache 2.2 安装好后新建任意 PHP 文件访问时返回 500 Internal Server Error 解决方法
- webconfig文件serviceHostingEnvironment节点出错的解决方法
- PHP和Nginx 文件上传大小限制问题解决方法
- PHPMyAdmin导入时提示文件大小超出PHP限制的解决方法