上路抗压,野爹常来
摘要: 百度下载QueryList类库文件 /** * 抓取数据源 * @param $rules array 抓取规则 * @param $url string url * @return mixed */ function getQueryList($rules, $url) { $html = fil 阅读全文
posted @ 2021-04-23 10:15 上路抗压 阅读(97) 评论(0) 推荐(0) 编辑
摘要: //php获取指定范围内的日期 function periodDate($startDate, $endDate) { $startTime = strtotime($startDate); $endTime = strtotime($endDate); $arr = []; while ($sta 阅读全文
posted @ 2021-04-23 10:13 上路抗压 阅读(181) 评论(0) 推荐(0) 编辑
摘要: //获取两个日期之间相差天数 function diffBetweenTwoDays ($day1, $day2) { $second1 = strtotime($day1); $second2 = strtotime($day2); if ($second1 < $second2) { $tmp 阅读全文
posted @ 2021-04-23 10:12 上路抗压 阅读(319) 评论(0) 推荐(0) 编辑
摘要: //1、Unix时间戳转日期 function unixtime_to_date($unixtime, $timezone = 'PRC') { $datetime = new DateTime("@$unixtime"); //DateTime类的bug,加入@可以将Unix时间戳作为参数传入 $ 阅读全文
posted @ 2021-04-23 10:11 上路抗压 阅读(518) 评论(0) 推荐(0) 编辑
摘要: 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 上路抗压 阅读(310) 评论(0) 推荐(0) 编辑