摘要: 在Base控制器里写: View::assign('aaa','123'); 阅读全文
posted @ 2022-04-11 15:50 _迷途 阅读(38) 评论(0) 推荐(0) 编辑
摘要: db_host = "localhost" db_user = "root" db_pass = "root" db_name = "test" db_port = 3306 db_charset = "utf8" # -*- coding: utf-8 -*- """Python连接到 MySQL 阅读全文
posted @ 2022-03-17 09:47 _迷途 阅读(287) 评论(0) 推荐(0) 编辑
摘要: /** * @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 _迷途 阅读(54) 评论(0) 推荐(0) 编辑
摘要: hexdec(uniqid()) hexdec(uniqid()) 阅读全文
posted @ 2022-03-03 13:15 _迷途 阅读(345) 评论(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 _迷途 阅读(35) 评论(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 _迷途 阅读(188) 评论(0) 推荐(0) 编辑
摘要: location / { if (!-e $request_filename){ rewrite ^(.*)$ /index.php?s=$1 last; break; } } 阅读全文
posted @ 2022-01-13 10:12 _迷途 阅读(1245) 评论(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 _迷途 阅读(141) 评论(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 _迷途 阅读(1654) 评论(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 _迷途 阅读(218) 评论(0) 推荐(0) 编辑