会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
上路抗压,野爹常来
上路抗压
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
下一页
2021年5月25日
PHP7连接Mongo
摘要: PHP7连接Mongo #PHP7连接mongo protected $conn = null; protected $database = null;//MongoDB数据库名 public function _initialize() { $this->conn = self::getMongo
阅读全文
posted @ 2021-05-25 16:12 上路抗压
阅读(143)
评论(0)
推荐(0)
2021年5月20日
TP5连接redis
摘要: ##config配置 /*redis链接*/ 'redis' => [ 'default' => [ 'type' => 'redis', 'debug' => true, 'hostname' => '127.0.0.1', 'port' => 6379, 'auth' => '', 'timeo
阅读全文
posted @ 2021-05-20 11:11 上路抗压
阅读(544)
评论(0)
推荐(0)
2021年4月23日
PHP QueryList采集器
摘要: 百度下载QueryList类库文件 /** * 抓取数据源 * @param $rules array 抓取规则 * @param $url string url * @return mixed */ function getQueryList($rules, $url) { $html = fil
阅读全文
posted @ 2021-04-23 10:15 上路抗压
阅读(111)
评论(0)
推荐(0)
PHP获取指定范围内的日期
摘要: //php获取指定范围内的日期 function periodDate($startDate, $endDate) { $startTime = strtotime($startDate); $endTime = strtotime($endDate); $arr = []; while ($sta
阅读全文
posted @ 2021-04-23 10:13 上路抗压
阅读(205)
评论(0)
推荐(0)
PHP 获取两个日期之间相差天数
摘要: //获取两个日期之间相差天数 function diffBetweenTwoDays ($day1, $day2) { $second1 = strtotime($day1); $second2 = strtotime($day2); if ($second1 < $second2) { $tmp
阅读全文
posted @ 2021-04-23 10:12 上路抗压
阅读(329)
评论(0)
推荐(0)
PHP 获取1970年前的时间戳,且为负
摘要: //1、Unix时间戳转日期 function unixtime_to_date($unixtime, $timezone = 'PRC') { $datetime = new DateTime("@$unixtime"); //DateTime类的bug,加入@可以将Unix时间戳作为参数传入 $
阅读全文
posted @ 2021-04-23 10:11 上路抗压
阅读(557)
评论(0)
推荐(0)
php使用elasticsearch
摘要: ES 功能类库 <?php /** * Created by PhpStorm. * User: Administrator * Date: 2021/4/2 * Time: 17:36 */ use Elasticsearch\ClientBuilder; class ES{ private $e
阅读全文
posted @ 2021-04-23 10:09 上路抗压
阅读(331)
评论(0)
推荐(0)
2021年2月21日
springboot响应格式Resullt封装
摘要: package com.example.demo.unity; import com.auth0.jwt.JWT;import com.auth0.jwt.algorithms.Algorithm;import com.example.demo.dao.Admin;import org.slf4j.
阅读全文
posted @ 2021-02-21 09:52 上路抗压
阅读(280)
评论(0)
推荐(0)
springboot+JWT
摘要: 1、生成JWT验证字符串 /** * 生成token * @param admin Object * @return String */public String getToken(Admin admin){ String token = ""; //JWT.create()创建token with
阅读全文
posted @ 2021-02-21 09:49 上路抗压
阅读(118)
评论(0)
推荐(0)
tp5.1安装和使用workerman
摘要: ##一、tp5.1安装workerman composer安装: composer require topthink/think-worker=2.0.* ##二、使用 使用自定义类作为worker入口服务类 在config中创建worker_server.php <?php // + // | W
阅读全文
posted @ 2021-02-21 09:45 上路抗压
阅读(1165)
评论(0)
推荐(0)
上一页
1
2
3
4
5
下一页
公告