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

相关文章

PHP经典的给图片加水印程序

<?php   /**************************************************************  参数...

PHP实现二维数组去重功能示例

本文实例讲述了PHP实现二维数组去重功能。分享给大家供大家参考,具体如下: php中二维数组去重操作。例如从数据库中查询出的记录,根据某个键做去重操操作 代码如下: /** * 删...

PHP浮点比较大小的方法

本文实例讲述了PHP浮点比较大小的方法。分享给大家供大家参考,具体如下: <?php /** * 浮点数一般是不能用来比较大小的,但是我们可以用一种变通的的方式 *...

php+jQuery ajax实现的实时刷新显示数据功能示例

本文实例讲述了php+jQuery ajax实现的实时刷新显示数据功能。分享给大家供大家参考,具体如下: 创建数据表:demo -- -- 表的结构 `demo` -- CREATE...

PHP使用OB缓存实现静态化功能示例

本文实例讲述了PHP使用OB缓存实现静态化功能。分享给大家供大家参考,具体如下: 实现步骤 1、创建测试数据表并且写入数据 2、实现后台的更新操作。使用OB缓存针对每一个内容生成对应的H...