PHP脚本中include文件出错解决方法
作者:bea
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, c
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 清除网页病毒的方法
- php读取msn上的用户信息类
- php获取网页内容方法总结
- php smarty的预保留变量总结
- php 页面执行时间计算代码
- Zend Studio 无法启动的问题解决方法
- Optimizer与Debugger兼容性问题的解决方法
- Apache+php+mysql在windows下的安装与配置图解(最新版)
- discuz论坛 用户登录 后台程序代码
- php 移除数组重复元素的一点说明
- PHP 遍历XP文件夹下所有文件
- cmd下运行php脚本
- PHPMailer安装方法及简单实例
- php miniBB中文乱码问题解决方法
- php AJAX实例根据邮编自动完成地址信息
- php 删除无限级目录与文件代码共享
- Pear DB 新手入门指南教程
- PHP strtr() 函数使用说明
- PHP下一个非常全面获取图象信息的函数