01 2013 档案
摘要:/** 強制更新圖片緩存* @param Array $files 要更新的圖片* @param int $version 版本*/function force_reload_file($files=array(), $version=0){ $html = ''; if(!isset($_COOKIE['force_reload_page_'.$version])){ // 判斷是否已更新過 setcookie('force_reload_page_'.$version, true, time()+2592000); $html .= '
阅读全文
摘要:DataReturn.class.phptype = $this->exists($param,'type')? strtoupper($param['type']) : 'JSON'; // 類型 JSON,XML,CALLBACK,ARRAY $this->xmlroot = $this->exists($param,'xmlroot')? $param['xmlroot'] : 'xmlroot'; // xml root dom name $this->callbac
阅读全文
摘要:StrFilter.class.php_white_list = $white_list; $this->_black_list = $black_list; $this->_replacement = $replacement; } /** 替换非法字符 * @param String $content 要替換的字符串 * @return String 替換后的字符串 */ public function replace($content){ if(!isset($content) || $co...
阅读全文
摘要:1. 数组#定义数组array=("163" "21cn" "sina" "qq")#获取数组长度echo ${#array[*]}#遍历数组for arr in ${array[*]}; do echo $arrdone2. 转换大小写# 使用typeset后必须重新赋值才起作用typeset -u content #uppercontent="Show Me The Money"echo $contenttypeset -l content #lowercontent="Show
阅读全文