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将图片保存为不同规格的图片类。分享给大家供大家参考。具体如下: 图片处理类.imagecls.php如下: <?php /** 图片处理类 *...

PHP使用Pear发送邮件(Windows环境)

PHP使用Pear发送邮件(Windows环境)

本文实例介绍了PHP使用Pear发送邮件的方法,以及如何在Windows下安装PHP Pear的步骤,分享给大家供大家参考,具体内容如下 一、PEAR安装 1、PEAR简介 PEAR是P...

PHP使用flock实现文件加锁的方法

本文实例讲述了PHP使用flock实现文件加锁的方法。分享给大家供大家参考。具体分析如下: flock在官方文档里的解释是:flock() 允许你执行一个简单的可以在任何平台中使用的读取...

PHP实现生成模糊图片的方法示例

PHP实现生成模糊图片的方法示例

本文实例讲述了PHP实现生成模糊图片的方法。分享给大家供大家参考,具体如下: <?php class image_blur{ /** * 图片高斯模糊(适用于png...

phpmyadmin安装时提示:Warning: require_once(./libraries/common.inc.php)错误解决办法

比较简洁的方法:新建一个目录将phpmyadmin中的文件复制到这个目录中,iis中设置一下路径。 安装好PHPmyAdmin后,在IE里访问时会出现下面的这种错误: Warning:...