![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
TP
司江龙
这个作者很懒,什么都没留下…
展开
-
TP6-composer安装验证码
composer require topthink/think-captcha原创 2020-03-09 15:38:20 · 463 阅读 · 0 评论 -
TP6使用composer开启多应用模块扩展
cd 进入你的项目目录执行下面命令,就可以开启TP6的app目录下多模块扩展了 composer require topthink/think-multi-app原创 2020-03-09 11:56:41 · 1775 阅读 · 0 评论 -
TP5源码Facade门面模式执行流程思维导图。
原创 2020-02-10 10:56:38 · 270 阅读 · 0 评论 -
Thinkphp类的映射优化生成classmap.php文件
生成classmap.php文件命令:php think optimize:autoload原创 2020-02-06 14:47:34 · 768 阅读 · 0 评论 -
php获取图片rgb值,判断图片是否纯黑纯白
/** * 获取图片 RGB 值 * @param $url * @return float|int */ public function ChoiceImage($url){ //判断图片是否存在 if(@fopen($url,'r')){ $total = 0; ...原创 2019-11-27 10:29:27 · 1208 阅读 · 0 评论 -
TP5 自毁类
<?php namespace app\admin\controller; use think\Db; use app\common\controller\Common; use think\Config; class Delete extends Common{ /** * 直接删除数据库 * @return [type] [description] */ publi...原创 2019-05-25 15:11:31 · 180 阅读 · 0 评论 -
base64字符串转换图片上传到服务器php代码
原生php 代码 $imageName = "25220_".date("His",time())."_".rand(1111,9999).'.png'; //图片名称 $image = $_POST['uploads']; //APP传过来的 base 64 字符串 $path = __DIR__.'/sign/'.date("Ymd"); //获取文...原创 2018-07-18 15:34:30 · 1055 阅读 · 0 评论 -
json中文解决编码问题,和去除双引号,加单引号方法。
/*json添加单引号*/ function my_arr_zhuan_json($arr) { $jsonstr = $this->my_json_decode(json_encode($arr,true)); $new_jsonstr = $this->decodeUnicode($jsonstr); $str1 = str_replace("name...原创 2018-10-16 14:27:42 · 2295 阅读 · 0 评论 -
php算每月天数方法,和十二个月每月开始时间戳和结束时间戳方法
/*算天数*/ function is_yue_tian_num($nian,$month){ if (in_array($month, array(1, 3, 5, 7, 8, 01, 03, 05, 07, 08, 10, 12))) { $text = '31'; }elseif ($month == 2){ ...原创 2018-10-16 10:24:58 · 1457 阅读 · 0 评论 -
TP 3.23 二维数组排序
/** * @desc arraySort php二维数组排序 按照指定的key 对数组进行自然排序 * @param array $arr 将要排序的数组 * @param string $keys 指定排序的key * @param string $type 排序类型 asc | desc * @return array */ ...原创 2018-10-09 10:53:43 · 468 阅读 · 0 评论 -
TP3.23 常用sql语句 语法
<?php // 本类由系统自动生成,仅供测试用途 namespace Home\Controller; use Think\Model; use Think\Controller; class IndexController extends Controller { public function index() { // echo '<...原创 2018-10-08 18:46:42 · 720 阅读 · 0 评论 -
微信公众号开发获取openid和用户基本信息还有发消息的TP3.23方法类
<?php namespace Home\Controller; use Think\Controller; /** * */ class WeixinController extends Controller { var $tokenFile; const appid = 'appid'; const secret = 'secret'; ...原创 2018-10-11 16:21:15 · 897 阅读 · 0 评论 -
date时间格式转毫秒时间戳和获取当前毫秒时间戳php
//获取当前时间戳(毫秒的) function msectime() { list($msec, $sec) = explode(' ', microtime()); $msectime = (float)sprintf('%.0f', (floatval($msec) + floatval($sec)) * 1000); return $msectime; }...原创 2018-09-15 15:55:39 · 3595 阅读 · 0 评论 -
thinkphp3.23 导入导出excle
<blockquote class="layui-elem-quote"> <div class="layui-inline"> <label class="layui-form-label">开始时间</label> <div class="原创 2018-09-07 18:58:52 · 215 阅读 · 0 评论 -
php 二维数组去重
//含多属性商品 $item1=array(); foreach($new_arr as $k1=>$v1){ $attr_id = $v1["goods_attr_id"]; $attr_arr = M('goods_attr')->where("goods_attr_id = '{$attr_id}'")-&...原创 2018-08-14 18:35:01 · 125 阅读 · 0 评论