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面向对象程序设计方法。分享给大家供大家参考,具体如下: PHP5开始支持面向对象,示例如下: <?php class classna...

PHP5.6读写excel表格文件操作示例

本文实例讲述了PHP5.6读写excel表格文件操作。分享给大家供大家参考,具体如下: 测试环境:php5.6.24.这块没啥兼容问题。 需要更多栗子,请看PHPExcel的exampl...

PHP中用header图片地址 简单隐藏图片源地址

复制代码 代码如下:<?php        $path=$_GET["path"];  ...

Java和PHP在Web开发方面对比分析

Java和PHP在Web开发方面对比分析

比较PHP和JSP这两个Web开发技术,在目前的情况是其实是比较PHP和Java的Web开发。以下是我就几个主要方面进行的比较:   一、 语言比较   PHP是解释执行的服务器脚本语言...

PHP面向对象学习笔记之一 基础概念

1> if( "false" ) 等效于 if( true), 因为非空字符串是true 2> 检查数据类型: is_array(); is_object(); is_str...