- 博客(6)
- 资源 (2)
- 收藏
- 关注
原创 上传/压缩图片
/** * 接收图片信息并进行转码 * @param $file * @return bool|string */ public function uploadImg($file) { $imgUrl = base64_encode(file_get_contents($file)); if($imgUrl) { $url = $this -> base64_img("data:image/png;base64,".$imgUrl); retu.
2021-11-10 11:43:34 90
原创 PHP 微信JSP支付
微信支付所需参数 openId //微信用户ID 登录授权时获取 appid //公众号appid 微信公众号获取 appSecret //公众号appkey 微信公众号后台获取 mch_id //商户号mechid 微信商户号后台获取 mchsecret //商户api秘钥 微信商户号后台获取 //控制器操作 public function Pay(){ $fee...
2021-11-10 10:35:25 226
原创 PHP 合并图片,图片新增水印
private function imageMerge($file1,$file2){ $filets['width'] = '300';//宽 $filets['height'] = '300';//高 $filets['x'] = ''; //x轴 $filets['y'] =''; //y轴 //本地的绝对路径 $dst_path = $file1;//背景图 $src_path=...
2021-11-09 11:17:08 166
原创 PHP 微信小程序生成二维码
直接贴源码 (使用场景微信的getwxacodeunlimit接口) private $appid = 微信的appid; private $secret = ''; //获取access_token public function get_access_token($state){ $url = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&a...
2020-07-25 17:05:32 450
原创 tp3.2增加集成第三方融云
//TP3.2使用融云第三方类生成融云TOKEN //1.下载地址 https://github.com/rongcloud/server-sdk-php //2.类存放地址 //3.控制器层进行引入 vendor('RongCloud.API.RongCloud','','.php'); //引入融云第三方类 //4.生成唯一融云TOKEN $appKey = '********'; //融云官方注册的key $appSecret = '********'; //融..
2020-06-12 16:06:24 166 1
原创 针对tp3.2数据库基础操作
查询单条数据 $where = array('user_token' => $token); //条件 $str = M('merchant_user')->where($where)->find(); // 根据条件查询出M出的表中单个信息 多表联查(distinct()去除当前字段中重复数据保留一个) $where = array("user_id" => $user_id , "state" => '1'); $data = M('commod...
2020-06-12 16:00:16 198
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人