PHP脚本中include文件出错解决方法

yipeiwu_com6年前PHP代码库
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权限是否打开,该权限决定了目录能否被浏览。

相关文章

codeigniter实现get分页的方法

本文实例讲述了codeigniter实现get分页的方法。分享给大家供大家参考。具体实现方法如下: public function project_search(){ $this...

详解php设置session(过期、失效、有效期)

在php中设置session有很多方面包有给session设置值或直接设置过期、失效和有效期,下面小编来给大家给各位朋友介绍怎么使用。 我们先来看看在php.ini中session怎么设...

php实现用于验证所有类型的信用卡类

本文实例讲述了php实现用于验证所有类型的信用卡类。分享给大家供大家参考。具体如下: 这个php类比较完整,可以用于验证各种不同的信用卡,针对信用卡的卡号的通用规则进行了验证,同时对不同...

php 常用类汇总 推荐收藏

图表库下面的类库可以让你很简单就能创建复杂的图表和图片。当然,它们需要GD库的支持。pChart - 一个可以创建统计图的库。Libchart - 这也是一个简单的统计图库。JpGrap...

php编程每天必学之验证码

本文为大家分享了php图片验证码的实现代码,分享给大家供大家参考,具体内容如下 1.验证码图片生成 captcha.php //1.生成100*30大小的图片,默认为黑色 $ima...