用户名: 密码: 验证码: 注册           网站地图 高级搜索 RSS订阅 收藏本站
山东十七地市站长联盟信息: 济南 青岛 淄博 枣庄 东营 烟台 潍坊 济宁 泰安 威海 日照 莱芜 临沂 德州 聊城 滨州 菏泽      
您的位置:主页>网络编程>Php编程>

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

[ 来源:山东站长网 | 作者: | 更新日期:2007-7-13 23:01:55 | 评论 0 条 | 我要投稿 ]

     经常当php页面中利用include, require, require_once包含了一些其他位置的页面时,会出现错误,比如没有发现次页面,或者权限不允许等,可以  根据以下方法来排除 字串4

  1. 出现“未找到文件“类似的错误时候,检查include文件的位置是否正确,下面引用php手册页面的原话: 字串9

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. 字串8

  2. 当出现permission deny 类似错误的时候,按以下方法排除 字串4

  a) 检测被包含的文件读权限是否打开

字串8

  b) 检测被包含的文件路径上的每个目录的x权限是否打开,该权限决定了目录能否被浏览。

字串2


Tags:文件 解决 方法 脚本 网页 动态 in is 权限 the current
您的评论
用户名:新注册) 密码: 匿名评论 [所有评论]

·用户发表意见仅代表其个人意见,并且承担一切因发表内容引起的纠纷和责任
·本站管理人员有权在不通知用户的情况下删除不符合规定的评论信息或留做证据
·请客观的评价您所看到的资讯,提倡就事论事,杜绝漫骂和人身攻击等不文明行为