会员
周边
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
迷途
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
8
9
下一页
2023年1月10日
Python获取URL图片文件的哈希值 hash
摘要: pip install Pillow import hashlib from io import BytesIO def get_hash(file): """ :param bytes file: :return: """ md5hash = hashlib.md5(Image.open(file
阅读全文
posted @ 2023-01-10 15:04 _迷途
阅读(396)
评论(0)
推荐(0)
2022年12月23日
PHP通过数据库的方式递归查询当前分类ID的所有子分类ID
摘要: /** * 通过数据库的方式递归查询当前分类ID的所有子分类ID * @param $id * @return array * @throws DataNotFoundException * @throws DbException * @throws ModelNotFoundException *
阅读全文
posted @ 2022-12-23 23:26 _迷途
阅读(176)
评论(0)
推荐(0)
PHP通过数据库递归的方式查找当前分类ID的所有上级ID
摘要: /** * 通过数据库递归的方式查找当前分类ID的所有上级ID * @throws ModelNotFoundException * @throws DbException * @throws DataNotFoundException */ public function findAllParen
阅读全文
posted @ 2022-12-23 23:13 _迷途
阅读(145)
评论(0)
推荐(0)
2022年12月22日
ThinkPHP5.1路由写法的改进
摘要: thinkphp/library/think/route/Rule.php 第794行,增加这段代码: elseif (is_array($route) && count($route) == 2) { $result = $this->dispatchMethod($request, $route
阅读全文
posted @ 2022-12-22 10:39 _迷途
阅读(102)
评论(0)
推荐(0)
2022年12月14日
Python | PHP | JAVA 发送消息到企业微信机器人
摘要: 企业微信群机器人说明文档:https://developer.work.weixin.qq.com/document/path/91770。利用群机器人有个优点,在程序哪里经常抛出异常,就可以在第一时间知道。 Python3: import json import requests from dat
阅读全文
posted @ 2022-12-14 09:30 _迷途
阅读(545)
评论(0)
推荐(0)
2022年12月13日
thinkphp6 json(captcha())为空
摘要: 首先: composer require topthink/think-captcha v3.0.8 把这张图片下载,后缀名png改成zip,解压到: vendor/topthink
阅读全文
posted @ 2022-12-13 14:55 _迷途
阅读(86)
评论(0)
推荐(0)
Thinkphp6 Class 'think\\facade\\Filesystem' not found
摘要: composer require topthink/think-filesystem
阅读全文
posted @ 2022-12-13 11:02 _迷途
阅读(630)
评论(0)
推荐(0)
2022年12月7日
ipv6正则表达式
摘要: ^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d
阅读全文
posted @ 2022-12-07 15:12 _迷途
阅读(133)
评论(0)
推荐(0)
2022年12月3日
thinkPHP6.0 开启多应用后无法获取控制器和方法名、返回空值
摘要: 首先开启多应用的方法: composer require topthink/think-multi-app 定义路由: <?php use think\facade\Route; Route::any('/user/login', '\\app\\index\\controller\\User@lo
阅读全文
posted @ 2022-12-03 22:20 _迷途
阅读(494)
评论(0)
推荐(0)
2022年11月24日
PHP轻量级验证器 Particle\Validator
摘要: Particle\Validator是一个小巧优雅的实用的PHP验证类库,提供了一个非常简洁的API。它无需依赖其他组件,提供友好的文档,并且有利于扩展。 composer require particle/validator use Particle\Validator\Validator; $v
阅读全文
posted @ 2022-11-24 16:20 _迷途
阅读(149)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
8
9
下一页
公告