04 2016 档案

摘要:1 /** 2 * 获取用户真实IP 3 * @return $onlineIp 4 */ 5 public function getOnlineIp() 6 { 7 if (getenv('HTTP_CLIENT_IP')) { 8 $onlineIp = getenv('HTTP_CLIEN... 阅读全文
posted @ 2016-04-27 12:17 多多喜 阅读(294) 评论(0) 推荐(0)
摘要:1 urlencode_array($postData); 16 $postData['sign'] = md5(implode('', $postData) . md5('!!wxpay!!')); 17 return $url . '?' . http_build_query($postData); 18 } 19 20 // ... 阅读全文
posted @ 2016-04-19 10:31 多多喜 阅读(5642) 评论(2) 推荐(0)
摘要:urlencode:编码 URL 字符串 手册上是这样解释的: 返回字符串,此字符串中除了 -_. 之外的所有非字母数字字符都将被替换成百分号(%)后跟两位十六进制数,空格则编码为加号(+)。此编码与 WWW 表单 POST 数据的编码方式是一样的,同时与 application/x-www-for 阅读全文
posted @ 2016-04-19 10:24 多多喜 阅读(4370) 评论(2) 推荐(1)
摘要:1 public function json_encode($array) 2 { 3 $returnStr = ''; 4 $str = @json_encode($array); 5 if (preg_match_all("/\\\u[a-z0-9]{4}|[\w\W]+/U", $str, $matchs)) { 6 ... 阅读全文
posted @ 2016-04-08 12:02 多多喜 阅读(1537) 评论(0) 推荐(0)