摘要: public function authlogin(){ if($_GET){ $appid = ''; //微信的appid $secret= ''; //微信的secret秘钥 $code= $_GET['code'];//小程序传来的code值 $url = "https://api.weix 阅读全文
posted @ 2019-04-26 16:26 小强君 阅读(1187) 评论(0) 推荐(0) 编辑
摘要: /^(([1-9][0-9]*)|(([0]\.\d{1,2}|[1-9][0-9]*\.\d{1,2})))$/; //正则匹配价格金额允许保留小数点后面两位数. 阅读全文
posted @ 2017-12-01 16:16 小强君 阅读(16924) 评论(0) 推荐(0) 编辑
摘要: <style> .re_page2{ width:auto; height:30px; padding-right:10px; padding-top:10px; float:right;} .re_page2 a { text-decoration: none; border: 1px solid 阅读全文
posted @ 2017-11-29 11:25 小强君 阅读(445) 评论(0) 推荐(0) 编辑
摘要: //持行添加操作 public function doAdd(){ //创建验证规则 $rules=array( //array('price','/^[0-9]*$/','无效的价格',1),//必须验证price array('price', '/^[0-9]*$/', '无效的价格!', 1, 阅读全文
posted @ 2017-11-29 11:13 小强君 阅读(530) 评论(0) 推荐(0) 编辑
摘要: $dst_path = 'https://ss0.baidu.com/6ONWsjip0QIZ8tyhnq/it/u=1597468794,3856954595&fm=80&w=179&h=119&img.JPEG'; //创建图片的实例 $dst = imagecreatefromstring(f 阅读全文
posted @ 2017-10-18 17:39 小强君 阅读(201) 评论(0) 推荐(0) 编辑
摘要: $arr = array( array( 'user_id' => 100, 'goods_id' => 10, 'number' => 1, ), array( 'user_id' => 102, 'goods_id' => 10, 'number' => 1, ), array( 'user_i 阅读全文
posted @ 2017-09-14 16:43 小强君 阅读(1411) 评论(0) 推荐(0) 编辑
摘要: //$com 为数据源 $newarr = array(); if(is_array($com)){ foreach($com as $v){ if(!in_array($v,$newarr,true)){ $newarr[] = $v; } } }else{ return false; } 阅读全文
posted @ 2017-09-07 10:46 小强君 阅读(256) 评论(0) 推荐(0) 编辑
摘要: if(empty($v)){ $indexes=''; }else{ if(!eregi("[^\x80-\xff]",$v)){ $fchar=ord($v{0}); if($fchar>=ord('A') && $fchar<=ord('z')) return strtoupper($v{0}) 阅读全文
posted @ 2017-09-07 10:42 小强君 阅读(416) 评论(0) 推荐(0) 编辑
摘要: <?php //加上手机号亲测没有问题 $tel="18201129310";//电话号码 $m=randpw(6);//生成随机字符串 //调用发送短信的方法 $sms = send_sms($tel, "正在注册十里,验证码是".$m."【十里】"); //这里send_sms第二个参数是短信内 阅读全文
posted @ 2017-08-18 19:36 小强君 阅读(401) 评论(0) 推荐(0) 编辑
摘要: $length='6';//长度 $chars ='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; $username=''; for ($i = 0; $i < $length; $i++) { // 这里提供两种字 阅读全文
posted @ 2017-08-18 19:35 小强君 阅读(252) 评论(0) 推荐(0) 编辑