外包网www.waibao.com.cn
欢迎 游客 , 注册 | 登录 | 会员 | 界面 | 简洁版本 | 在线 | 帮助
外包网论坛(威客,威客网,悬赏任务)

如何成为一名群主?   

发表新主题 回复该主题
本主题被查看56次, 共1个帖子, 1页, 当前为第1页     选择页数: 1      跳转到第   上一主题   下一主题
标题: php脚本中include文件报错解决方法
版主
UID: 16051
来自:
精华: 0
积分: 6673
帖子: 6669
注册: 2008-6-10 11:56:00
状态: 离线
包子皮: 4.00
包子馅: 1670.50 元
只看楼主 2008-11-19 16:31
php脚本中include文件报错解决方法
我的身份:公司
认证信息:  未实名认证
基本诚信:0
项目诚信:0
经验积分:26
我的服务范围:
尚未填写
    
经常当php页面中利用include, require, require_once包含了一些其他位置的页面时,会出现错误,比如没有发现次页面,或者权限不允许等,可以根据以下方法来排除
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权限是否打开,该权限决定了目录能否被浏览。

                    
#1  
发表新主题 回复该主题
本主题被查看56次, 共1个帖子, 1页, 当前为第1页     选择页数: 1      跳转到第







现在的时间是 2009-01-09 06:54:49

版权所有 外包网  
         Powered by Discuz!NT 1.0.2656    Copyright © 2001-2009 Comsenz Inc.
Processed in 0.08 seconds