PHP require/include顺序详解

在大型的web项目中, include_path是一个模块化设计的根本中的根本(当然,现在也有很多基于autoload的设计, 这个不影响本文的探讨), 但是正是因为include_path, 经常会让我们遇到一些因为没有找到正确的文件而导致的看似"诡异"的问题.也就有了如下的疑问:include_path是怎么起作用的?如果有多个include_path顺序是怎么样的?什么情况下include_path不起作用?

阅读全文

个人空间上安装phpMyAdmin方法

首先下载一份最新版的phpmyadmin mysql管理器,解压后得到一个phpmyadmin的目录,这个可以改名,找到目录里的config.inc.php文件,打开找到 $cfg['pmaabsoluteuri'] 修改为你将上传到空间的phpmyadmin的网址: 

阅读全文

php include()调用文件简单实例

include.php文件如下:

其它提示:在使用require()语句调用文件时,如果没有找到文件,require()语句会输出错误信息,并且立即终止脚本的处理.而include()语句在没有找到文件时则会输出警告,不会终止脚本的处理.

阅读全文

php 错误报告开启详细实现

定义和用法:error_reporting(),设置 php 的报错级别并返回当前级别。

语法:error_reporting(report_level)如果参数 level 未指定,当前报错级别将被返回。下面几项是 level 可能的值

阅读全文

session Cannot send session cache limiter 错误提示

错误提示,session cannot send session cache limiter,开始时经常会碰到如下提示:warning: session_start() [function.session-start]: cannot send session cache limiter - headers already sent (output started at e:php www.phprm.com admin.php:1) in e:phpwww.phprm.comlogolistadminlogo.php on line 2

阅读全文