shopex 里面大量使用 引用传递。牵一发而动全身。修改代码时尽量不要 传值相关的 触碰源码。

set_include_path() 函数 是在脚本里动态地对PHP.ini中include_path进行修改的。
constant("WITH_MEMCACHE") 返回一个常量的值
defined() 函数检查某常量是否存在。
file_get_contents()函数把整个文件一次性读入一个字符串中。
function_exists($funcname) php检测函数是否存在函数
=& 引用传递
ob_start() 函数用于打开缓冲区
ob_get_level — 返回输出缓冲机制的嵌套级别
ob_end_clean() 关闭缓冲区
get_class_methods 函数的作用是返回由类的方法名组成的数组。
array_flip — 交换数组中的键和值
array_unshift() 函数用于向数组插入新元素。新数组的值将被插入到数组的开头。
bool method_exists ( object object, string method_name) 检查类的方法是否存在。
htmlspecialchars() 函数把预定义的字符转换为 HTML 实体。
strtolower — 将字符串转化为小写
basename() 函数返回路径中的文件名部分。
filemtime() 函数返回文件内容上次的修改时间。
max() 返回最大值。

urlencode()、urldecode()、rawurlencode()、rawurldecode()这些函数来解决网页URL编码解码问题。
urldecode() 解码URL编码的字符串
http://php.net/manual/zh/function.urldecode.php

ob_get_contents() - 返回输出缓冲区的内容
ob_flush() - 冲刷出(送出)输出缓冲区中的内容
ob_clean() - 清空(擦掉)输出缓冲区
ob_end_flush() - 冲刷出(送出)输出缓冲区内容并关闭缓冲
ob_end_clean() - 清空(擦除)缓冲区并关闭输出缓冲
flush() - 刷新输出缓冲 

register_shutdown_function() 可以让我们设置一个当执行关闭时可以被调用的另一个函数。 1、页面被(用户)强制停止。 2、程序代码意外终止或超时。

//字符串转数组
split(string $pattern, string $string [, int $limit]); // 第一个参数可以正则匹配
array explode ( string $separator, string $string [, int $limit]) // 第一个参数是普通字符

intval() 变量转成整数类型

--调用函数的方法 , 调用类内部的方法
call_user_func('a', "111","222"); 显示: 111 222
call_user_func_array('a', array("111", "222")); 显示: 111 222
function a($b,$c)
{
echo $b;
echo $c;
}

get_magic_quotes_gpc();
值为1,表示开启。那么 php会自动为POST、GET、COOKIE传过来的参数值自动增加转义字符“\”,来确保这些数据的安全性。尤其是防止SQL注入。
如果值1,表示开启;为0,表示配置关闭!

include_path 针对的include和require的路径范围进行限定。
如果我们没有设置这个值,可能我们需要写一些完全的路径:
<?php
include("123/test1.php");
include("123/test2.php");
include("123/test3.php");
require("123/test4.php");
require("123/test5.php");
?>
来引入很多外部文件,但是如果我们设置了set_include_path("123/"),我们就可以用下面这段代码代替。
<?php
set_include_path("123/");
include("test1.php");
include("test2.php");
include("test3.php");
require("test4.php");
require("test5.php");
?>
http://blog.sina.com.cn/s/blog_4ce89f200100twbl.html