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

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

相关文章

PHP取余函数介绍MOD(x,y)与x%y

取余函数 PHP取余函数 PHP两个取余 MOD(x,y) x%y MOD 例如:9/3,9是被除数,3为除数.mod函数是一个求余函数,其格式为: mod(nExp1,nExp2),...

解析PHP函数array_flip()在重复数组元素删除中的作用

我们都知道,PHP中的数组元素删除的方式可以有很多种,经常用到的函数有php中array_unique()。那么我们今天为大家介绍的PHP函数array_flip()在删除数组重复元素时...

PHP图片处理之使用imagecopy函数添加图片水印实例

为图片添加水印也是图片处理中常见的功能。因为只要在页面中见到的图片都可以很轻松地拿到,你辛辛苦苦编辑的图片不想被别人不费吹灰之力拿走就用,所以为图片添加水印以确定版权,防止图片被盗用。制...

php中getservbyport与getservbyname函数用法实例

本文实例讲述了php中getservbyport与getservbyname函数用法。分享给大家供大家参考。具体如下: 复制代码 代码如下: string getservbyport (...

php empty函数 使用说明

Determine whether a variable is considered to be empty. 但是在我的记忆中,有很长一段时间一直以为empty应该是能够判断一个东西是...