>## 1. 生成url
>**U('控制器名/操作名',參數數組,url模式)**
>url模式 參考配置文件中的 URL_MOD
>下例中url(默認模式將省略 index.php):/?c=user&a=index&id=1
>pathinfo模式:/index.php/user/index/id/1
$url = U('user/index',['id'=>1]);
>## 2. 獲取/設置 配置信息
>**C(配置項,值)**
$mod = C('URL_MOD'); //獲取 URL_MOD 配置
C('THEME','red'); //設置 THEME 配置值為 red(設置模板目錄是red)
>## 3. 設置 DEBUG 模式
>**debug(值)**
debug(0); //關閉DEBUG
debug(1); //開啟DEBUG
>## 4. GET & POST 參數取值
>**I(參數名,分隔符)**
優先取GET,不存在時取POST
第二個參數作用是 傳遞類似【&id=1,2,3,4,5】的參數時,參數值將被分割成數組;
$name = I('name');
$id = I('id',',');
>## 5. 打印元素
>**P(元素)**
可打印元素包括 字符串,數組,對象
當僅需要打印結果的字符串 而 不需要輸出到瀏覽器時可加第二個參數 false
P($user);
$str = P($user,false); //獲取打印結果的字符串,不輸出到瀏覽器
>## 6. 設置路由
>**route(array)**
設置規則詳見路由部分
>[danger]route 函數必須在入口文件中使用,其他地方使用無效
route(['u'=>['user','index','userid']]);
>## 7. 設置/獲取 COOKIE
>**cookie(名稱,值,過期時間,路徑)**
$user = cookie('user'); //獲取cookie
cookie('user',$user,3600); //設置cookie 超時3600秒
>## 8. 記錄日志
>**_log(日志內容,目錄名)**
日志文件將被保存在 /rundir/目錄名/年月日.log
$log = "用戶登錄失敗";
_log($log,'login'); //日志將被記錄在 /rundir/login/20171021.log
>## 9. 創建目錄
>**make_dir($dir,$mode=0755,$recursive=true,$throwErr=false)**
>$dir:創建的路徑
>$mode:權限(linux下有效,例如 0755)
>$recursive:是否連續創建
>$throwErr:是否拋出異常
$dir = PUB . 'static/img';
make_dir($dir);
>## 10. 刪除文件或目錄
>**del_dir($dir,$t=false)**
>$dir:路徑
>$t:是否刪除目錄 默認只刪除文件不刪除目錄
>返回刪除的數量
$dir = PUB . 'static/img';
del_dir($dir);
## 其它函數請自行查看 functions.php 文件注釋