摘要: 1 conn = mysql_connect($server, $c['username'], $c['password'], true) or die('connect db error'); 18 mysql_select_db($c['dbname'], $this->conn) or die('select db error'); 19 if($c['charset']){ 20 mysql_query("set names " . $c['charset& 阅读全文
posted @ 2014-04-02 13:50 猿来如些 阅读(179) 评论(0) 推荐(0) 编辑
摘要: ",$con); $con = preg_replace("/[\n\r\t]*\{loop\s+(\\$[-\w]+)\s+(\\$[-\w]+)\s+(\\$[-\w]+)\}[\n\r\t]*/"," \\3): ?>",$con); $con = preg_replace("/[\n\r\t]*\{\/loop\}[\n\r\t]*/i","",$con); $con = preg_replace("/[\n\r\t]*\{\s*if\s+(\\$[-\w]+)\s*([=> 阅读全文
posted @ 2014-04-02 13:49 猿来如些 阅读(220) 评论(0) 推荐(0) 编辑
摘要: public function downloads($name){ $name_tmp = explode("_",$name); $type = $name_tmp[0]; $file_time = explode(".",$name_tmp[3]); $file_time = $file_time[0]; $file_date = date("Y/md",$file_time); $file_dir = SITE_PATH."/data/uploads/$type/$file_date/"; ... 阅读全文
posted @ 2014-04-02 13:47 猿来如些 阅读(127) 评论(0) 推荐(0) 编辑
摘要: 1 forLinux();18 break;19 case "solaris":20 break;21 case "unix":22 break;23 case "aix":24 break;25 ... 阅读全文
posted @ 2014-04-02 13:46 猿来如些 阅读(428) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2014-04-02 13:45 猿来如些 阅读(210) 评论(0) 推荐(0) 编辑
摘要: 需要或者不需要返回值得ajax函数封装 /** * 原生的ajax封装 * param : * url : * data : * success : * cache : */ var ajax = function(param){ typeof param === "object"; for(var i in param){ param[i] = param[i] === undefined ? "" : param[i] ; } var ajax = window.XMLHttpRequest ? new XMLHttpReq... 阅读全文
posted @ 2014-04-02 13:42 猿来如些 阅读(211) 评论(0) 推荐(0) 编辑
摘要: 1 /** 2 * 密码混淆器 3 */ 4 $.fn.enKey = function(size){ 5 var size = (size === undefined || isNaN(size)) ? 4 : size; 6 var self = this; 7 this.keyup(function(event){ 8 var charAll = "0123456789abcdefghijklmnop"+ 9 "qrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";10 var changValue = f... 阅读全文
posted @ 2014-04-02 13:41 猿来如些 阅读(352) 评论(0) 推荐(0) 编辑
摘要: 一个矩形生成工具和颜色调配http://css3pie.com/http://www.cssmatic.com/阴影工具http://www.layerstyles.org/这个工具很有用http://lea.verou.me/css3patterns/超级按钮工具http://alexwolfe.github.io/Buttons/http://cssmenumaker.com/http://topcoat.io/http://ianlunn.github.io/Hover/文本阴影http://www.themeshock.com/css-text-shadow/tips简单的http:/ 阅读全文
posted @ 2014-04-02 13:39 猿来如些 阅读(483) 评论(0) 推荐(0) 编辑
摘要: 1 // 获取客户端IP地址 2 function get_client_ip() { 3 static $ip = NULL; 4 if ($ip !== NULL) 5 return $ip; 6 if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) { 7 $arr = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']); 8 $pos = array_search('unknown', $arr); 9 if (fals... 阅读全文
posted @ 2014-04-02 13:37 猿来如些 阅读(173) 评论(0) 推荐(0) 编辑
摘要: 1 2097152){45 $def++;46 $this->log($log,$def);47 exit;48 }else{49 $now = "[".date('Y-m-d H:i:s')."] ";50 $log = $now .$log. "\r\n";51 error_log($log, 3,$log_file, null);52 }53 return $def;54 }55 ?> 阅读全文
posted @ 2014-04-02 13:35 猿来如些 阅读(427) 评论(0) 推荐(0) 编辑