当前位置:首页>python>5行Python代码,把你的微信聊天记录变成可搜索的数据库

5行Python代码,把你的微信聊天记录变成可搜索的数据库

  • 2026-08-20 10:11:10
5行Python代码,把你的微信聊天记录变成可搜索的数据库

那个让我翻了两小时聊天记录的下午

上周四,同事问我:上次你在群里发的那个餐厅叫什么来着?就是带包间的那个。

我说我找找。

打开微信群聊,开始往上翻。翻了十分钟,没翻到。群里消息太多了,每天几百条。我试着用微信自带的搜索,搜餐厅,出来几百条结果,从2026年到现在的都有,一条一条看,根本看不过来。

又试了搜包间。出来十几条,都不是我要的那条。

最后花了将近两个小时,手动从大概那个时间段的聊天记录里一条一条看,才找到。原来当时说的是饭馆不是餐厅,提到包间的时候说的是有单间

微信自带的搜索,只支持关键词精确匹配。你想不起来当时用的什么词,就搜不到。

当天晚上我就写了这个脚本。


思路

把微信聊天记录导入到SQLite数据库里,利用SQLite的FTS5全文搜索引擎来查询。

FTS5不是简单的关键词匹配。能分词,支持模糊搜索,还能按相关度排序。最关键的是,SQLite是Python自带的,不用装任何额外服务。

整体流程:

  1. 导出微信聊天记录(CSV格式)

  2. Python脚本读取CSV,写入SQLite

  3. 建FTS5全文索引

  4. 写一个查询函数,随时搜


怎么导出微信聊天记录

微信自己没有导出功能。需要用第三方工具。

目前比较靠谱的方案:

方案一:WechatExporter(推荐)

GitHub开源项目,支持Mac和Windows。把手机备份文件解析成HTML或CSV。地址搜 BlueMatthew/WechatExporter 就能找到。

方案二:PyWxDump

也是开源的,可以直接从Windows版微信的数据库里解密提取。搜 xaoyaoo/PyWxDump

不管你用哪个工具,最终目标是拿到一个CSV文件,格式如下:

timestamp,sender,content,chat_name2026-03-15 14:23:01,张三,周末去哪吃饭,朋友聚餐群2026-03-15 14:23:45,我,上次去的那个湘菜馆不错,朋友聚餐群2026-03-15 14:24:12,李四,哪个湘菜馆?,朋友聚餐群2026-03-15 14:24:58,我,就是望京那个 好像叫湘味楼,朋友聚餐群2026-03-15 14:25:30,张三,有包间吗,朋友聚餐群2026-03-15 14:26:01,我,有 上次我们就是在包间吃的 有单间,朋友聚餐群

每行一条消息,四个字段:时间、发送人、消息内容、聊天名称(群名或联系人昵称)。

有了这个CSV,后面的事情就简单了。


完整代码

"""微信聊天记录全文搜索工具将导出的CSV聊天记录导入SQLite,支持FTS5全文检索依赖:Python 3.8+(无需额外安装第三方库)"""import csvimport sqlite3from datetime import datetimefrom pathlib import Path# ============ 配置 ============CSV_FILE = "wechat_export.csv"# 导出的聊天记录CSV文件DB_FILE = "wechat_search.db"# SQLite数据库文件名# ============ 1. 建库建表 ============def init_database(db_path=DB_FILE):"""初始化SQLite数据库,创建普通表和FTS5虚拟表"""conn = sqlite3.connect(db_path)cursor = conn.cursor()# 创建主表,存原始数据cursor.execute("""        CREATE TABLE IF NOT EXISTS messages (            id INTEGER PRIMARY KEY AUTOINCREMENT,            timestamp TEXT,            sender TEXT,            content TEXT,            chat_name TEXT,            date_str TEXT        )    """)# 创建FTS5虚拟表,用于全文搜索# tokenize='unicode61' 对中文支持较好# 也可以用 'jieba' 分词,但需要额外配置cursor.execute("""        CREATE VIRTUAL TABLE IF NOT EXISTS messages_fts        USING fts5(            content,            sender,            chat_name,            content='messages',            content_rowid='id',            tokenize='unicode61'        )    """)# 创建触发器,主表插入数据时自动同步到FTS表cursor.execute("""        CREATE TRIGGER IF NOT EXISTS messages_ai AFTER INSERT ON messages BEGIN            INSERT INTO messages_fts(rowid, content, sender, chat_name)            VALUES (new.id, new.content, new.sender, new.chat_name);        END;    """)conn.commit()returnconn# ============ 2. 导入CSV数据 ============def import_csv(conncsv_path=CSV_FILE):"""从CSV文件导入聊天记录到数据库"""cursor = conn.cursor()# 先看看已经有多少数据,避免重复导入cursor.execute("SELECT COUNT(*) FROM messages")existing_count = cursor.fetchone()[0]imported = 0skipped = 0with open(csv_path"r"encoding="utf-8"as f:reader = csv.DictReader(f)for row in reader:timestamp = row.get("timestamp""").strip()sender = row.get("sender""").strip()content = row.get("content""").strip()chat_name = row.get("chat_name""").strip()if not content:skipped += 1continue# 提取日期部分,方便按日期筛选date_str = timestamp[:10if len(timestamp>10 else""cursor.execute("INSERT INTO messages (timestamp, sender, content, chat_name, date_str) VALUES (?, ?, ?, ?, ?)",                (timestampsendercontentchat_namedate_str),            )imported += 1conn.commit()print(f"导入完成:新增 {imported} 条,跳过空消息 {skipped} 条")print(f"数据库总计:{existing_count + imported} 条消息")# ============ 3. 全文搜索 ============def search_messages(connquerychat_name=Nonesender=Nonelimit=20):"""    全文搜索聊天记录    参数:        query: 搜索关键词        chat_name: 限定聊天对象(可选)        sender: 限定发送人(可选)        limit: 返回结果数量    """cursor = conn.cursor()# 构建FTS5查询# FTS5 支持 AND OR NOT 等操作符# 默认用关键词搜索所有字段fts_query = query# 基础查询:从FTS表搜索,关联主表拿完整数据sql = """        SELECT            m.timestamp,            m.sender,            m.content,            m.chat_name,            rank        FROM messages_fts fts        JOIN messages m ON m.id = fts.rowid        WHERE messages_fts MATCH ?    """params = [fts_query]# 可选:按聊天名称过滤if chat_name:sql += " AND m.chat_name = ?"params.append(chat_name)# 可选:按发送人过滤if sender:sql += " AND m.sender = ?"params.append(sender)# 按相关度排序(rank越小越相关)sql += " ORDER BY rank LIMIT ?"params.append(limit)cursor.execute(sqlparams)results = cursor.fetchall()return resultsdef search_by_date_range(connquerystart_dateend_datelimit=20):"""在指定日期范围内搜索"""cursor = conn.cursor()sql = """        SELECT            m.timestamp,            m.sender,            m.content,            m.chat_name,            rank        FROM messages_fts fts        JOIN messages m ON m.id = fts.rowid        WHERE messages_fts MATCH ?          AND m.date_str BETWEEN ? AND ?        ORDER BY rank        LIMIT ?    """cursor.execute(sql, (querystart_dateend_datelimit))return cursor.fetchall()# ============ 4. 统计功能 ============def get_chat_stats(conn):"""获取各聊天的消息统计"""cursor = conn.cursor()cursor.execute("""        SELECT            chat_name,            COUNT(*) as msg_count,            MIN(date_str) as earliest,            MAX(date_str) as latest        FROM messages        GROUP BY chat_name        ORDER BY msg_count DESC    """)returncursor.fetchall()# ============ 5. 交互式查询 ============def print_results(results):"""格式化打印搜索结果"""if not results:print("没有找到匹配的消息\n")returnfor i, (timestampsendercontentchat_namerankin enumerate(results1):print(f"[{i}] {timestamp}  [{chat_name}]  {sender}:")print(f"    {content}")print()def interactive_search(conn):"""交互式搜索循环"""print("\n"+"="*50)print("微信聊天记录搜索")print("="*50)print("命令说明:")print("  直接输入关键词 → 全文搜索")print("  /chat 群名 → 限定在某个群搜索")print("  /from 人名 → 限定某人发的消息")print("  /date 起始日期 结束日期 关键词 → 按日期范围搜索")print("  /stats → 查看各聊天消息统计")print("  /quit → 退出")print("="*50+"\n")current_chat = Nonecurrent_sender = NonewhileTrue:try:user_input = input("搜索> ").strip()except (EOFErrorKeyboardInterrupt):print("\n再见")breakif not user_input:continueif user_input == "/quit":print("再见")breakelif user_input == "/stats":stats = get_chat_stats(conn)print(f"\n{'聊天名称':<20} {'消息数':>8} {'最早日期':<12} {'最近日期':<12}")print("-"*56)forchat_namecountearliestlatestinstats[:20]:print(f"{chat_name:<20} {count:>8} {earliest:<12} {latest:<12}")print()elif user_input.startswith("/chat "):current_chat = user_input[6:].strip()current_sender = Noneprint(f"已限定搜索范围:{current_chat}\n")elif user_input.startswith("/from "):current_sender = user_input[6:].strip()print(f"已限定发送人:{current_sender}\n")elif user_input.startswith("/date "):parts = user_input[6:].strip().split(" "2)if len(parts>3:start_dateend_datequery = partsresults = search_by_date_range(connquerystart_dateend_date)print(f"日期范围 {start_date} ~ {end_date} 的搜索结果:\n")print_results(results)else:print("格式:/date 2024-01-01 2024-06-30 关键词\n")elif user_input == "/all":current_chat = Nonecurrent_sender = Noneprint("已清除搜索限定,搜索全部记录\n")else:# 普通关键词搜索results = search_messages(conn,user_input,chat_name=current_chat,sender=current_sender,            )print()print_results(results)# ============ 主程序 ============def main():db_path = Path(DB_FILE)csv_path = Path(CSV_FILE)# 初始化数据库conn = init_database(db_path)# 如果CSV存在且数据库是新的,就导入if csv_path.exists():import_csv(connstr(csv_path))else:print(f"提示:未找到 {CSV_FILE},将使用已有数据库")cursor = conn.cursor()cursor.execute("SELECT COUNT(*) FROM messages")count = cursor.fetchone()[0]if count == 0:print("数据库为空,请先导出微信聊天记录为CSV文件")print(f"并将文件命名为 {CSV_FILE} 放在当前目录")returnprint(f"数据库中已有 {count} 条消息")# 进入交互式搜索interactive_search(conn)conn.close()if __name__ == "__main__":main()

运行效果

先把CSV文件放到脚本同目录下,然后运行:

python wechat_search.py
导入完成:新增 158432 条,跳过空消息 2041 条数据库总计:158432 条消息==================================================微信聊天记录搜索==================================================命令说明:  直接输入关键词 → 全文搜索  /chat 群名 → 限定在某个群搜索  /from 人名 → 限定某人发的消息  /date 起始日期 结束日期 关键词 → 按日期范围搜索  /stats → 查看各聊天消息统计  /quit → 退出==================================================搜索> 湘菜馆[1] 2024-03-15 14:23:45  [朋友聚餐群]  我:    上次去的那个湘菜馆不错[2] 2024-03-15 14:24:12  [朋友聚餐群]  李四:    哪个湘菜馆?[3] 2024-03-15 14:24:58  [朋友聚餐群]  我:    就是望京那个 好像叫湘味楼搜索> /chat 朋友聚餐群已限定搜索范围:朋友聚餐群搜索> 包间[1] 2024-03-15 14:26:01  [朋友聚餐群]  我:    有 上次我们就是在包间吃的 有单间搜索> /date 2024-03-01 2024-03-31 聚餐日期范围 2024-03-01 ~ 2024-03-31 的搜索结果:[1] 2024-03-15 14:23:01  [朋友聚餐群]  张三:    周末去哪吃饭[2] 2024-03-20 18:45:12  [朋友聚餐群]  李四:    周五聚餐的事定了吗搜索> /stats聊天名称                 消息数   最早日期     最近日期--------------------------------------------------------朋友聚餐群               12456   2022-06-15  2024-11-20工作项目群               34521   2023-01-08  2024-11-21老王                     8923    2021-09-01  2024-11-19

包间的时候,即使消息原文用的是单间,FTS5也能通过相关度排序把它排在前面。当然这取决于具体的分词效果,中文场景下 unicode61 分词器表现还行。


关于中文分词

FTS5内置的 unicode61 分词器,对中文的处理不算完美。它是按字符级别拆的,不是按词。搜湘菜馆能找到结果,是因为三个字都匹配上了。

如果你想要更精确的中文分词,可以接入jieba。改造方式:

import jiebadef tokenize_chinese(text):"""用jieba分词"""return " ".join(jieba.cut(text))

然后在导入CSV的时候,对content先做一遍分词,存到FTS表里。搜索时也对查询词做分词。效果会好不少,但导入速度会慢一些。

对于日常搜个关键词找聊天记录来说,unicode61 已经够用了。


数据量大了怎么办

15万条消息,搜索响应在毫秒级别。SQLite的FTS5在这方面表现很好。

如果你有好几年的聊天记录,量级到了百万条,也没问题。SQLite本身支持几十GB的数据,FTS5的索引效率也不错。

实在觉得慢了,可以加个日期范围过滤,先缩小搜索范围再做全文检索。代码里的 search_by_date_range 函数就是干这个的。


一些安全提醒

聊天记录是很隐私的数据。几点建议:

  • 生成的 wechat_search.db 文件不要传到公共位置

  • CSV导出文件用完可以删掉,数据库里已经有了

  • 如果你在公司的电脑上跑,注意别把私人聊天记录导出来

  • 不要把数据库上传到GitHub


最后

这个脚本没有任何第三方依赖。Python自带的 sqlite3 和 csv 模块就搞定了。FTS5是SQLite 3.9.0以后内置的功能,Python 3.8+ 的SQLite版本都支持。

5行代码是个标题党。但核心逻辑确实不多——建表、导入、查询,加起来也就几十行。

如果你还想加什么功能,比如按时间线浏览、导出某人的所有消息、统计聊天活跃度,思路都在代码里了,扩展起来不难。

下一篇写什么,评论区见。

“无他,惟手熟尔”!有需要的用起来!关注微信公众号「Nicholas与Pypi」获取更多Python实战!
------加入知识库与更多人一起学习------

https://ima.qq.com/wiki/?shareId=f2628818f0874da17b71ffa0e5e8408114e7dbad46f1745bbd1cc1365277631c

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-08-21 15:44:52 HTTP/2.0 GET : https://f.mffb.com.cn/a/504886.html
  2. 运行时间 : 0.398063s [ 吞吐率:2.51req/s ] 内存消耗:4,588.73kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=62cc1f52bbd2d76ada8b9b26d953dae3
  1. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/public/index.php ( 0.79 KB )
  2. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/autoload.php ( 0.17 KB )
  3. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_real.php ( 2.49 KB )
  4. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/platform_check.php ( 0.90 KB )
  5. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/ClassLoader.php ( 14.03 KB )
  6. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_static.php ( 4.90 KB )
  7. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper.php ( 8.34 KB )
  8. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/helper.php ( 2.19 KB )
  9. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/helper.php ( 1.47 KB )
  10. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/stubs/load_stubs.php ( 0.16 KB )
  11. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Exception.php ( 1.69 KB )
  12. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Facade.php ( 2.71 KB )
  13. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/deprecation-contracts/function.php ( 0.99 KB )
  14. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap.php ( 8.26 KB )
  15. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap80.php ( 9.78 KB )
  16. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/Resources/functions/dump.php ( 1.49 KB )
  17. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-dumper/src/helper.php ( 0.18 KB )
  18. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/VarDumper.php ( 4.30 KB )
  19. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/App.php ( 15.30 KB )
  20. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Container.php ( 15.76 KB )
  21. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/container/src/ContainerInterface.php ( 1.02 KB )
  22. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/provider.php ( 0.19 KB )
  23. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Http.php ( 6.04 KB )
  24. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Str.php ( 7.29 KB )
  25. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Env.php ( 4.68 KB )
  26. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/common.php ( 0.03 KB )
  27. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/helper.php ( 18.78 KB )
  28. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Config.php ( 5.54 KB )
  29. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/app.php ( 0.95 KB )
  30. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cache.php ( 0.78 KB )
  31. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/console.php ( 0.23 KB )
  32. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cookie.php ( 0.56 KB )
  33. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/database.php ( 2.48 KB )
  34. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Env.php ( 1.67 KB )
  35. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/filesystem.php ( 0.61 KB )
  36. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/lang.php ( 0.91 KB )
  37. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/log.php ( 1.35 KB )
  38. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/middleware.php ( 0.19 KB )
  39. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/route.php ( 1.89 KB )
  40. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/session.php ( 0.57 KB )
  41. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/trace.php ( 0.34 KB )
  42. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/view.php ( 0.82 KB )
  43. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/event.php ( 0.25 KB )
  44. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Event.php ( 7.67 KB )
  45. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/service.php ( 0.13 KB )
  46. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/AppService.php ( 0.26 KB )
  47. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Service.php ( 1.64 KB )
  48. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Lang.php ( 7.35 KB )
  49. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/lang/zh-cn.php ( 13.70 KB )
  50. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/Error.php ( 3.31 KB )
  51. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/RegisterService.php ( 1.33 KB )
  52. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/services.php ( 0.14 KB )
  53. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/PaginatorService.php ( 1.52 KB )
  54. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ValidateService.php ( 0.99 KB )
  55. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ModelService.php ( 2.04 KB )
  56. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Service.php ( 0.77 KB )
  57. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Middleware.php ( 6.72 KB )
  58. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/BootService.php ( 0.77 KB )
  59. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Paginator.php ( 11.86 KB )
  60. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/Validate.php ( 63.20 KB )
  61. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Model.php ( 23.55 KB )
  62. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Attribute.php ( 21.05 KB )
  63. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/AutoWriteData.php ( 4.21 KB )
  64. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Conversion.php ( 6.44 KB )
  65. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/DbConnect.php ( 5.16 KB )
  66. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/ModelEvent.php ( 2.33 KB )
  67. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/RelationShip.php ( 28.29 KB )
  68. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Arrayable.php ( 0.09 KB )
  69. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Jsonable.php ( 0.13 KB )
  70. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/contract/Modelable.php ( 0.09 KB )
  71. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Db.php ( 2.88 KB )
  72. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/DbManager.php ( 8.52 KB )
  73. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Log.php ( 6.28 KB )
  74. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Manager.php ( 3.92 KB )
  75. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerTrait.php ( 2.69 KB )
  76. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerInterface.php ( 2.71 KB )
  77. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cache.php ( 4.92 KB )
  78. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/simple-cache/src/CacheInterface.php ( 4.71 KB )
  79. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Arr.php ( 16.63 KB )
  80. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/driver/File.php ( 7.84 KB )
  81. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/Driver.php ( 9.03 KB )
  82. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/CacheHandlerInterface.php ( 1.99 KB )
  83. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/Request.php ( 0.09 KB )
  84. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Request.php ( 55.78 KB )
  85. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/middleware.php ( 0.25 KB )
  86. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Pipeline.php ( 2.61 KB )
  87. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/TraceDebug.php ( 3.40 KB )
  88. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/middleware/SessionInit.php ( 1.94 KB )
  89. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Session.php ( 1.80 KB )
  90. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/driver/File.php ( 6.27 KB )
  91. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/SessionHandlerInterface.php ( 0.87 KB )
  92. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/Store.php ( 7.12 KB )
  93. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Route.php ( 23.73 KB )
  94. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleName.php ( 5.75 KB )
  95. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Domain.php ( 2.53 KB )
  96. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleGroup.php ( 22.43 KB )
  97. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Rule.php ( 26.95 KB )
  98. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleItem.php ( 9.78 KB )
  99. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/route/app.php ( 1.72 KB )
  100. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Route.php ( 4.70 KB )
  101. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/dispatch/Controller.php ( 4.74 KB )
  102. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Dispatch.php ( 10.44 KB )
  103. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/controller/Index.php ( 4.81 KB )
  104. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/BaseController.php ( 2.05 KB )
  105. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/facade/Db.php ( 0.93 KB )
  106. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/connector/Mysql.php ( 5.44 KB )
  107. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/PDOConnection.php ( 52.47 KB )
  108. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Connection.php ( 8.39 KB )
  109. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/ConnectionInterface.php ( 4.57 KB )
  110. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/builder/Mysql.php ( 16.58 KB )
  111. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Builder.php ( 24.06 KB )
  112. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseBuilder.php ( 27.50 KB )
  113. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Query.php ( 15.71 KB )
  114. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseQuery.php ( 45.13 KB )
  115. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TimeFieldQuery.php ( 7.43 KB )
  116. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/AggregateQuery.php ( 3.26 KB )
  117. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ModelRelationQuery.php ( 20.07 KB )
  118. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ParamsBind.php ( 3.66 KB )
  119. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ResultOperation.php ( 7.01 KB )
  120. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/WhereQuery.php ( 19.37 KB )
  121. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/JoinAndViewQuery.php ( 7.11 KB )
  122. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TableFieldInfo.php ( 2.63 KB )
  123. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/Transaction.php ( 2.77 KB )
  124. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/driver/File.php ( 5.96 KB )
  125. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/LogHandlerInterface.php ( 0.86 KB )
  126. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/Channel.php ( 3.89 KB )
  127. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/event/LogRecord.php ( 1.02 KB )
  128. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/Collection.php ( 16.47 KB )
  129. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/View.php ( 1.70 KB )
  130. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/View.php ( 4.39 KB )
  131. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Response.php ( 8.81 KB )
  132. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/response/View.php ( 3.29 KB )
  133. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cookie.php ( 6.06 KB )
  134. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-view/src/Think.php ( 8.38 KB )
  135. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/TemplateHandlerInterface.php ( 1.60 KB )
  136. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/Template.php ( 46.61 KB )
  137. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/driver/File.php ( 2.41 KB )
  138. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/contract/DriverInterface.php ( 0.86 KB )
  139. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/runtime/temp/067d451b9a0c665040f3f1bdd3293d68.php ( 11.98 KB )
  140. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Html.php ( 4.42 KB )
  1. CONNECT:[ UseTime:0.001253s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.002490s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.006745s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.037876s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.001569s ]
  6. SELECT * FROM `set` [ RunTime:0.000578s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.001539s ]
  8. SELECT * FROM `article` WHERE `id` = 504886 LIMIT 1 [ RunTime:0.013191s ]
  9. UPDATE `article` SET `lasttime` = 1787298292 WHERE `id` = 504886 [ RunTime:0.031451s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 66 LIMIT 1 [ RunTime:0.001526s ]
  11. SELECT * FROM `article` WHERE `id` < 504886 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.001407s ]
  12. SELECT * FROM `article` WHERE `id` > 504886 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.002108s ]
  13. SELECT * FROM `article` WHERE `id` < 504886 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.010197s ]
  14. SELECT * FROM `article` WHERE `id` < 504886 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.028505s ]
  15. SELECT * FROM `article` WHERE `id` < 504886 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.091957s ]
0.401764s