摘要: /** * 是否为合法的身份证(支持15位和18位) * @param string $card * @return boolean */ function is_card($card) { if (preg_match('/^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\ 阅读全文
posted @ 2018-05-16 13:54 宁佳兵 阅读(1276) 评论(0) 推荐(0) 编辑
摘要: /*发送邮件方法 *@param $to:接收者 $title:标题 $content:邮件内容 *@return bool true:发送成功 false:发送失败 */ function sendMail($to,$title,$content){ //引入PHPMailer的核心文件 vend 阅读全文
posted @ 2018-05-16 13:52 宁佳兵 阅读(227) 评论(0) 推荐(0) 编辑
摘要: /** * 无限极分类 * @param $arr 所有分类 * @param $pid * @param $step * @return array */ public function getTree($arr,$pid,$step){ global $tree; foreach($arr as 阅读全文
posted @ 2018-05-16 13:46 宁佳兵 阅读(205) 评论(0) 推荐(0) 编辑
摘要: /** * 跳转方法 * @param $msg * @param null $path * @param null $parent */ public function alert($msg,$path=NULL,$parent=NULL){ if($parent true){ $str=<<<s 阅读全文
posted @ 2018-05-16 13:45 宁佳兵 阅读(1157) 评论(0) 推荐(0) 编辑
摘要: /** * 生成原始的二维码(生成图片文件) * @param int $level * @param int $size */ public function qrcode($level=8,$size=8){ Vendor('phpqrcode.phpqrcode'); $errorCorrec 阅读全文
posted @ 2018-05-16 10:36 宁佳兵 阅读(153) 评论(0) 推荐(0) 编辑
摘要: 后台:public function share() { $appId = C("WX_APPID"); //appid $appSecret = C("WX_APPSECRET");// 秘钥 $curl = "https://api.weixin.qq.com/cgi-bin/token?gra 阅读全文
posted @ 2018-05-16 10:32 宁佳兵 阅读(230) 评论(0) 推荐(0) 编辑