摘要: function show($code, $message, $data = [], $httpCode = 200) { $result = [ 'code' => $code, 'msg' => $message, 'data' => $data, ]; return json($result, $httpCode); } 阅读全文
posted @ 2019-08-26 11:15 X__cicada 阅读(120) 评论(0) 推荐(0) 编辑
摘要: function getOrderSn(){ $yCode = array('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J'); $orderSn = $yCode[intval(date('Y')) - 2011] . strtoupper(dechex(date('m'))) . date('d') . substr(time(... 阅读全文
posted @ 2019-08-26 11:14 X__cicada 阅读(158) 评论(0) 推荐(0) 编辑
摘要: function xml_to_arr($xml){//xml字符串转数组 $objectxml = simplexml_load_string($xml,'SimpleXMLElement', LIBXML_NOCDATA);//将文件转换成 对象 $xmljson= json_encode($objectxml );//将对象转换个JSON $xmlar... 阅读全文
posted @ 2019-08-26 11:12 X__cicada 阅读(116) 评论(0) 推荐(0) 编辑
摘要: function is_wechat() { $ug= isset($_SERVER['HTTP_USER_AGENT'])?$_SERVER['HTTP_USER_AGENT']:''; if( stripos($ug,'micromessenger') !== false ){ return true; } return false; } ... 阅读全文
posted @ 2019-08-26 11:11 X__cicada 阅读(156) 评论(0) 推荐(0) 编辑
摘要: function remove_emoji($string) { $regex_emoticons = '/[\x{1F600}-\x{1F64F}]/u'; $clear_string = preg_replace($regex_emoticons, '', $string); // Match Miscellaneous Symbols and Pictographs $regex_symbo 阅读全文
posted @ 2019-08-26 11:10 X__cicada 阅读(514) 评论(0) 推荐(0) 编辑