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购物车模块功能分析(函数讲解,附源码)

一,购物车概述购物车是为消费者在网上购物中提供一个临时存储商品的地方。其主要功能包括:添加商品、删除商品、更改商品数量、商品金额小计、商品金额总计和清空购物车;还包括生成订单、订单打印、...

利用curl抓取远程页面内容的示例代码

最基本的操作如下复制代码 代码如下:$curlPost = 'a=1&b=2';//模拟POST数据$ch = curl_init();curl_setopt($ch, CURLOPT_...

php安装dblib扩展,连接mssql的具体步骤

1、先安装freetds 然后修改配置文件 不要装0.82版本,会报编译失败 Compile Failure With freetds0.82 进到freetds目录下编译安装 ./co...

php实现异步将远程链接上内容(图片或内容)写到本地的方法

本文实例讲述了php实现异步将远程链接上内容(图片或内容)写到本地的方法。分享给大家供大家参考,具体如下: /** * 异步将远程链接上的内容(图片或内容)写到本地 * * @...

php实现的仿阿里巴巴实现同类产品翻页

如果左边的记录条数小于$space(页码区段)的值,页码$start从1开始向右增值。如果左则的记录条数多于$left(左右各显示页数)的值,$start将从左边记录数减去$left值开...