会员
周边
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
迷途
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
3
4
5
6
7
8
9
下一页
2022年1月13日
ThinkPHP5 在Nginx环境下开启伪静态
摘要: location / { if (!-e $request_filename){ rewrite ^(.*)$ /index.php?s=$1 last; break; } }
阅读全文
posted @ 2022-01-13 10:12 _迷途
阅读(1338)
评论(0)
推荐(0)
2021年12月30日
获取某一时间戳的月份的开始时间戳和结束时间戳
摘要: <?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 _迷途
阅读(183)
评论(0)
推荐(0)
php判断一个字符串是否为日期格式
摘要: <?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 _迷途
阅读(1937)
评论(0)
推荐(0)
2021年12月28日
C#批量添加水印
摘要: .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 _迷途
阅读(364)
评论(0)
推荐(0)
2021年11月24日
PHP获取今日汽油价格接口
摘要: Selector.php下载:先把图片文件下载,然后把扩展名改成.zip,最后解压缩 <?php require "selector.php"; function getGasolinePrice() { try { $curl = curl_init(); curl_setopt_array($c
阅读全文
posted @ 2021-11-24 13:46 _迷途
阅读(191)
评论(0)
推荐(0)
2021年11月22日
正则表达式匹配括号引号内容
摘要: \(\'+[\\u4e00-\\u9fa5_a-zA-Z0-9\s]+?\'\)
阅读全文
posted @ 2021-11-22 21:42 _迷途
阅读(88)
评论(0)
推荐(0)
2021年10月26日
PHP 获取数组指定值的位置或下标
摘要: <?php //定义一个数组 $array = array(0 => 'a', 1 => 'b', 2 => 'c', 3 => 'd'); //使用 array_search('要搜索的值',数组); $key = array_search('b', $array); // $key = 1; $
阅读全文
posted @ 2021-10-26 17:45 _迷途
阅读(880)
评论(0)
推荐(0)
2021年10月22日
PHP生成8位不重复字符串
摘要: function randString():string { $code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; $rand = $code[rand(0,25)] .strtoupper(dechex(date('m'))) .date('d').substr(time()
阅读全文
posted @ 2021-10-22 17:30 _迷途
阅读(413)
评论(0)
推荐(0)
2021年8月23日
Laravel Admin命令行
摘要: 创建模型: php artisan make:model Models/User 创建控制器: php artisan admin:make UserController --model=App\\Models\\User php artisan cache:clear php artisan co
阅读全文
posted @ 2021-08-23 13:53 _迷途
阅读(118)
评论(0)
推荐(0)
2021年8月16日
Python判断当前时间是否在指定时间之间
摘要: def is_between(start_at, end_at) -> bool: """ 判断当前时间是否在指定时间之间 例如:指定时间段为[09:00:00, 18:00:00]若当前时间是 2021年8月16日17:53:45 ,判断是否在这个时间段,返回 True 另外:若指定时间段为[22
阅读全文
posted @ 2021-08-16 18:28 _迷途
阅读(1147)
评论(0)
推荐(0)
上一页
1
···
3
4
5
6
7
8
9
下一页
公告