自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Fting

不积硅步无以至千里~ Fting!

  • 博客(62)
  • 问答 (2)
  • 收藏
  • 关注

原创 Tp6 使用mongo 查询字段存在且不为空

【代码】【无标题】

2023-06-13 09:09:45 446

原创 Redis 删除队列List里面的某个值

【代码】Redis 删除队列List里面的某个值。

2023-04-28 14:29:28 1502

原创 Elasticsearch使用scroll_id游标 解决10000条数据限制

PHP Elasticsearch使用scroll_id游标 解决10000条数据限制。

2022-11-18 11:12:02 1113

转载 如何在docker容器中安装php自带的扩展模块

如何在docker容器中安装php自带的扩展模块

2022-11-02 11:16:57 4863 1

转载 docker php Call to undefined function imagettftext ()

docker php Call to undefined function imagettftext ()

2022-07-26 16:38:46 698

原创 Elasticsearch 字段录入中文之后,wildcard模糊查询只能单个字搜索,多个字搜索没有结果

Elasticsearch 字段录入中文之后,wildcard模糊查询只能单个字搜索,多个字搜索没有结果

2022-07-14 11:55:52 1450

原创 Redis 两个list 用新的list替换老的list 以及command keys must in same slot解决办法

redis list 'RENAME' command keys must in same slot

2022-06-20 15:50:02 867

转载 docker 配置nginx+php环境

https://www.cnblogs.com/rxbook/p/16090973.html

2022-04-13 10:54:49 453

原创 php 获取毫秒,一行代码搞定

intval(microtime(true)*1000);

2021-10-13 13:42:58 340

原创 curl json数据并获取返回响应头header信息

private static function curlJson($url, $data_string, $header = array() ) { $header[] = 'Expect:'; $header[] = 'X-AjaxPro-Method:ShowList'; $header[] = 'Accept: application/json,*/*'; $header[] = 'Content-Type: applicatio

2021-07-23 09:17:00 1034

转载 AES 密钥 各种长度

function keygen($length) { $token = ''; $tokenlength = round($length * 4 / 3); for ($i = 0; $i < $tokenlength; ++$i) { $token .= chr(rand(32, 1024)); } $token = base64_encode(str_shuffle($token)); return substr($token, 0.

2021-07-07 14:43:31 2409

原创 laravel-admin 登录页面无限重定向 1.8.10

config/admin.php'auth'=>[...'excepts'=>[ 'auth/login',]],然后就正常了

2020-12-23 14:20:43 1124 2

原创 php7.2给每个数组元素加上前缀 create_function换成匿名函数

$imglist = explode('|',$detail['imgList']);$arr = array_map(function($item){return "https://img1.360buyimg.com/n1/$item";}, $imglist);

2020-11-20 16:13:33 267

转载 Laravel中使用路由控制权限 思路

https://blog.csdn.net/pharaoh_shi/article/details/79711473

2020-10-20 14:53:33 539

原创 PHP 压缩图片尺寸 png做透明处理

//修改图片尺寸 png做透明处理//$imgsrc 要处理图片路径文件 $imgdst 生成图片路径文件 $new_width新的宽度 $new_height新的高度 public function compressedImg($imgsrc, $imgdst, $new_width, $new_height) { list($width, $height, $type) = getimagesize($imgsrc); switch ($type).

2020-09-01 11:21:25 443

转载 laravel Call to undefined method 1Illuminate\Database\Query\Builder::getForeignKeyName() or 1Illumin

vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/BelongsTo.php 添加!!!!!!!public function getForeignKeyName(){ $segments = explode('.', $this->getQualifiedForeignKeyName()); return end($segments);}public function getQual.

2020-07-31 15:44:21 813

原创 MAC 安装PHP7.2 启动php-fpm NOTICE: fpm is running, pid 13487 NOTICE: ready to handle connections

php-fpm配置文件daemonize = no 修改为daemonize = yessudo php-fpmOK!

2020-07-30 15:52:30 3991

原创 PHP 取中文字之间的数字 (满4元减1元)

主要是判断淘宝的满减$str = "满4元减1元";$po1= (strpos($str,"满"));$po2= (strpos($str,"元减"));echo '取值:'.substr($str,$po1+3,$po2-3);取值:4

2020-06-11 14:47:43 142

原创 支付宝 APP支付

创建充值:public function createRechargeOrder(){ $mobile = $this->request->post('mobile')?$this->request->post('mobile'):0; $amount = $this->request->post('amount')?$this->request->post('amount'):0;//充值金额 $ty.

2020-05-09 10:34:07 558

原创 解决svn working copy locked问题

1.svn服务器运行svn cleanup2.提交改动 这时候会提示是什么问题 我的问题是 post-commit hook failed (exit code 1) with output: Conflict discovered in '........../pdd.php';3.svn服务器运行svn cleanup4.把文件回退到 没有修改的状态5.提交,现在就...

2020-04-24 10:28:32 181

原创 openssl_public_encrypt(): key parameter is not a valid public key

public key 不管一行还是 64个字符分行都会报这个错误。找了一下用这种方法成功了$public_key = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQ...";$public_key = "-----BEGIN PUBLIC KEY-----\n" . wordwrap($public_key, 64, "\n", true) . "\n---...

2020-04-14 14:13:05 6010 1

转载 php 生成6位随机字符串

/** * 生成随机字母加数字 字符串 * @param int $len 要生成字符串长度 * @param null $chars 要生成字符串包含的字符 * @return string 生成的字符串 */ public function getRandomString($len = 6, $chars = null) ...

2020-04-06 11:02:54 2264

原创 JSON 字符串和对象对比

$str = '{"extraMap":"{\"app\":\"activitylist.html\"}"}';var_dump(json_decode($str));$str1 = '{"extraMap":{"app":"activitylist.html"}}';var_dump(json_decode($str1));object(stdClass)#1 (1) { ["...

2020-03-23 18:26:03 293

原创 中文年月日 日期转成时间戳

$time = '2020年01月01日 00:00:00';public function dateToTime($format='Y年m月d日 H:i:s', $time){ $dt = date_create_from_format ( $format, $time); $data['start'] = date_timestamp_get($dt);//当天开始时间...

2020-01-07 10:47:04 1952

原创 Tp5 调用阿里云OSSsdk

<?php//阿里云oss存储namespace app\common\controller;vendor('aliyun-oss.autoload');use OSS\OssClient;use OSS\Core\OssException;class AliyunOss{ public $accessKeyId = ""; public $accessKeySecre...

2019-12-05 15:27:30 1127

原创 tp5 分页查询同时循环操作数据

Db::name('orders') ->where($map) ->order('create_time desc') ->paginate(50) ->each(function($item, $key){ //循环操作 return $item; });

2019-11-20 10:09:19 649

原创 苏宁佣金链接获取商品ID

$str = 'https://sugs.suning.com/C6cTlAxy';$content = file_get_contents($str);preg_match('/id="ga_itemDataBean_itemID" value="(\d*)"/', $content, $matches);var_dump($matches);$preg="/[^0]+.*/is";...

2019-11-06 10:22:26 1073

转载 PHP 含秘钥的可逆加密解密算法

// 加密算法function encrypt($data, $key){ $key = md5($key); $x = 0; $len = strlen($data); $l = strlen($key); $char = ''; $str = ''; for ($i = 0; $i < $len; $i++) { ...

2019-10-21 09:22:33 1660

原创 tp5 读数据库的时候把时间戳格式字段改为日期格式

$result = Db::name("articles") ->alias('A') ->join('article_cate B', 'A.cate = B.id') ->where(["user_id"=>$this->user_id,"active"=>1]) ...

2019-05-21 17:13:46 3901

原创 PHP获取文件夹下的所有.png后缀的图片

$img_list = glob("./../public/img/haibao/*.png");

2019-03-27 15:09:51 1013

原创 淘宝客商品 获取详情图片

https://open.21ds.cn/index/index/openapi/id/73.shtml?ptype=1 我现在用的是他家的接口下面的接口不能用了 $.ajax({url:"https://hws.m.taobao.com/cache/desc/5.0?id="+id,//淘宝商品IDtimeout:1000,tryC...

2019-02-25 11:33:48 7222 4

原创 Mac下tp5 nginx 配置

server { listen 8080; server_name www.tp5api.mm; access_log /usr/local/var/www/logs/access.log; error_log /usr/local/var/www/logs/error.log; index ind...

2019-01-06 11:15:37 1155

转载 PHP对redis操作详解【转】

/*1.Connection*/$redis = new Redis();$redis-&gt;connect('127.0.0.1',6379,1);//短链接,本地host,端口为6379,超过1秒放弃链接$redis-&gt;open('127.0.0.1',6379,1);//短链接(同上)$redis-&gt;pconnect('127.0.0.1',6379,1);//长链接,...

2018-12-12 16:42:14 172

原创 php 分割中文字符串(1个字,多个字)

/** * 分割中文字符串 * $str 字符串 * $count 个数 */ public function mb_str_split($str, $count){ $leng = strlen($str)/3; //中文长度 $arr = array(); for ($i=...

2018-11-27 13:08:06 7122 1

原创 php 下载远程图片到本地(图片)

/** * @param $image 文件(数据库存储形式为2018/2018174760.jpg) * @param $imgName 重命名 */ public function downImg($image,$imgName) { $url = "http://xxx.com/Uploads/"; $file...

2018-11-27 13:06:43 781

原创 mysql数据库导入大sql文件

经测试其他的方法没什么用,使用sqlyog工具很快我导入的是800M的sql,没问题滴

2018-11-26 09:07:19 244

原创 Vue学习之路(2)vue-router

vue-router 是vue很重要的组成部分。1.一般用vue脚手架新建v项目时会选择安装vue-router,没有的话 在项目 目录下执行    sudo cnpm install vue-router 安装2.在src目录下有router文件夹 有index.js  import Vue from 'vue'import Router from 'vue-router...

2018-09-17 23:16:04 141

原创 Vue 学习之路(1)

前言:1.前一阵子断断续续的学习,没有系统的整理思路,学下来记录一下。           2.本人是phper js不好,学这个只是为了写个前后端分离的后台。只适合新手参考。只适合新手参考。只适合新手参考。一、建议直接用脚手架,script引入有很多东西用起来不方便。二、Ubuntu 安装vue-cli (我的是Ubuntu18.04)       1.sudo apt inst...

2018-09-14 16:06:46 201

原创 鼠标点击其他位置,弹出层 隐藏

$(document).mousedown(function(e){ if($(e.target).parent("#zoom_content").length==0){ var Media = document.getElementById("my-video"); Media.pause(); //暂停 $("#zoom").hide(); }...

2018-09-08 15:21:10 1324

原创 网站导航列表 点击添加active样式

&lt;script type="text/javascript"&gt;$(document).ready(function(){ $(".menu a").each(function(){ $this = $(this); if($this[0].href==String(window.location)){ ...

2018-08-09 11:16:31 1547

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除