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调用JAVA的WebService简单实例

使用PHP调用JAVA语言开发的WebService。客户端提交两个String类型的参数,服务端返回一个对象类型。服务端使用AXIS-1.4作为SOAP引擎。客户端为PHP5.2.9,...

PHP开发中的错误收集,不定期更新。

Fatal error: Non-static method Conn::__construct() cannot be called statically in /file.php 没...

PHP实现基数排序的方法详解

PHP实现基数排序的方法详解

本文实例讲述了PHP实现基数排序的方法。分享给大家供大家参考,具体如下: 基数排序是根据关键字中各位的值,通过对排序的N个元素进行若干趟“分配”与“收集”来实现排序的。 不妨通过一个具体...

详解php的魔术方法__get()和__set()使用介绍

先看看php官方文档的解释: __set() is run when writing data to inaccessible properties. __get() is utiliz...

php 小乘法表实现代码

复制代码 代码如下:<?php for($i=1;$i<10;$i++) { for($j=1;$j<=$i;$j++) { $result = $i*$j; if(s...