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 常用数组内部函数(Array Functions)介绍

本章讲述几个常用的 PHP 数组内部函数。 在前面我们已经介绍过PHP 数组,创建一个数组用 array() 函数,删除一个数组元素用 unset() 函数。本章节我们还要学习一些其它常...

解析百度搜索结果link?url=参数分析 (全)

前几天写过一篇可以获取到百度跳转之后的网址的文章,在百度了一下,有人也研究过百度link?url=的。 大概得出如下结果: 1、加密方式根据:随机+输入停留时间+快照地址进行加密 2、整...

php ignore_user_abort与register_shutdown_function 使用方法

语法: int ignore_user_abort(int [setting]); 返回值: 整数 函数种类: PHP 系统功能 内容说明 0 - NORMAL(正常)1 - ABORT...

Zend的AutoLoad机制介绍

代码示例 复制代码 代码如下: set_include_path(USVN_LIB_DIR . PATH_SEPARATOR . get_include_path()); require...