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缓存工具XCache安装与使用方法详解

本文实例讲述了PHP缓存工具XCache安装与使用方法。分享给大家供大家参考,具体如下: XCache是另外一种在PHP中使用的Opcode缓存工具。像APC一样,XCache在共享内存...

php xfocus防注入资料

这里没有太深的技术含量,我只是比较简单的谈了谈。(以下操作如无具体说 明,都是基于PHP+MySQL+Apache的情况) 在现在各种黑客横行的时候,如何实现自己ph...

smarty 缓存控制前的页面静态化原理

可在display中进行设置 $smarty->display("demo.tpl",$_SERVER[REQUEST_URI])来实现一个模版有多个缓存。 既然文件已经有缓存了,...

用PHP将数据导入到Foxmail的实现代码

用PHP将数据导入到Foxmail的实现代码

最近小阳做了一个PHP同学录,同学们自己在那里添加或修改姓名、邮箱、OICQ等信息,并保存在mySQL数据库里。某日小阳突然想到,如果能用PHP生成一个文件,供同学们下载并把这些资料导入...

PHP连接sql server 2005环境配置及问题解决

一、Windows下PHP连接SQLServer 2005 设定:安装的Windows操作系统(Win7 或XP均可,其他系统暂未测试),在C盘下;PHP的相关文件位于c:/PHP下面,...