下载帝国网站管理系统5.0正式版
 帝国论坛技术交流区网络编程php脚本中include文件报错解决方法
帝国备份王2008版发布
帝国CMS模板下载中心
测试:生成20万数据共用107分钟
《帝国下载系统》全面免费
帝国域名交易网
1G双线帝国空间+200M数据库=158
站长工具 - dotool.cn
广告联系QQ:627174919
主题:php脚本中include文件报错解决方法 [加入收藏夹]   

天浪歌
用户头衔:嘉宾

精华贴   :3
发贴数   :1745
经验值   :3974
注册时间:2006-09-14
信息 搜索 好友 发送悄悄话 《帝国网站管理系统》基础教程下载】   [第 1 楼]
php脚本中include文件报错解决方法
    经常当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权限是否打开,该权限决定了目录能否被浏览。



ECMSer
有事就Q我    3260602    3260602@qq.com
帝国教程之猪头系列
2007-08-19 00:13:18 已设置保密 顶部 回复 引用 报告 编辑 删除


快速回复
内容

使用EBB代码
使用smile代码
显示签名
自动分析url
自动分析img
表情                   
                
    (按 Ctrl+Enter 直接提交)
    顶部  加入收藏夹
关于帝国 | 广告服务 | 联系我们 | 法律声明 | 隐私条款 | 许可协议
Powered by: EBB Version 2.2.1