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使用str_replace替换多维数组的实现方法分析

本文实例讲述了php使用str_replace替换多维数组的实现方法。分享给大家供大家参考,具体如下: 在php中,如果使用str_replace替换数组中的字符串,只能替换一维的数组,...

PHP实现的迪科斯彻(Dijkstra)最短路径算法实例

PHP实现的迪科斯彻(Dijkstra)最短路径算法实例

本文实例讲述了PHP实现的迪科斯彻(Dijkstra)最短路径算法。分享给大家供大家参考,具体如下: 一、待解决问题 单源最短路径问题,在给定有向图中求一个顶点(单源顶点)到其他所有顶点...

解决php使用异步调用获取数据时出现(错误c00ce56e导致此项操作无法完成)

【详细错误】:由于出现错误 c00ce56e 而导致此项操作无法完成 【造成原因】:未指定输出编码格式。 【解决办法】:句首加入header("content-type:text/htm...

php基于openssl的rsa加密解密示例

本文实例讲述了php基于openssl的rsa加密解密。分享给大家供大家参考,具体如下: <?php $config = array( //"config" =>...

PHP实现QQ空间自动回复说说的方法

本文实例讲述了PHP实现QQ空间自动回复说说的方法。分享给大家供大家参考,具体如下: <?php header("Content-type: text/html; c...