摘要: /** * @param $arr array 数组 * @param $key string 唯一键 * @return array */ function getArrayUniqueByKeys(array $arr, string $key):array { if (isset($arr[0 阅读全文
posted @ 2022-03-11 15:53 _迷途 阅读(66) 评论(0) 推荐(0)
摘要: hexdec(uniqid()) hexdec(uniqid()) 阅读全文
posted @ 2022-03-03 13:15 _迷途 阅读(381) 评论(0) 推荐(0)
摘要: 查询用户ID为1的所有子用户: select id, name, parent from (select * from tablename order by parent, id) tablename, (select @pv := '1') initialisation where find_in 阅读全文
posted @ 2022-02-09 15:01 _迷途 阅读(44) 评论(0) 推荐(0)
摘要: /** * 格式化打印:JSON字符串|对象|数组 * @param string|array $data */ public static function Console($data) { if (is_string($data) && 0 < strlen($data) && self::is 阅读全文
posted @ 2022-01-14 15:17 _迷途 阅读(199) 评论(0) 推荐(0)
摘要: location / { if (!-e $request_filename){ rewrite ^(.*)$ /index.php?s=$1 last; break; } } 阅读全文
posted @ 2022-01-13 10:12 _迷途 阅读(1325) 评论(0) 推荐(0)
摘要: <?php function getMonthStartAndEnd($timestamp){ $startTime = strtotime(date("Y-m-01 00:00:00",$timestamp)); $startTimeStr = date("Y-m-d H:i:s",$startT 阅读全文
posted @ 2021-12-30 16:05 _迷途 阅读(160) 评论(0) 推荐(0)
摘要: <?php function validateDate($date, $format = 'Y-m-d H:i:s') { $d = DateTime::createFromFormat($format, $date); return $d && $d->format($format) == $da 阅读全文
posted @ 2021-12-30 16:02 _迷途 阅读(1903) 评论(0) 推荐(0)
摘要: .NET Framework:4.5 using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System. 阅读全文
posted @ 2021-12-28 18:42 _迷途 阅读(350) 评论(0) 推荐(0)
摘要: Selector.php下载:先把图片文件下载,然后把扩展名改成.zip,最后解压缩 <?php require "selector.php"; function getGasolinePrice() { try { $curl = curl_init(); curl_setopt_array($c 阅读全文
posted @ 2021-11-24 13:46 _迷途 阅读(173) 评论(0) 推荐(0)
摘要: \(\'+[\\u4e00-\\u9fa5_a-zA-Z0-9\s]+?\'\) 阅读全文
posted @ 2021-11-22 21:42 _迷途 阅读(82) 评论(0) 推荐(0)