当前位置:首页>python>Python自动整理文件夹:让下载目录井井有条

Python自动整理文件夹:让下载目录井井有条

  • 2026-07-03 03:16:19
Python自动整理文件夹:让下载目录井井有条

问题场景

你是否遇到过这种情况:每天下载的文件散落在"下载"文件夹里,找一份上周的合同要翻半天?设计师的源文件、运营的活动素材、测试导出的数据全都混在一起,每次新建项目都要先花10分钟整理文件夹?

手动整理费时费力,今天清理完明天又乱了。如果你有类似困扰,那么Python可以帮你彻底解决这个问题——写一个脚本,让文件夹自动按规则整理,下载即归位

核心方案

我们用Python的pathlib(更现代的文件操作库)和shutil(文件移动/复制)来实现自动化整理。主要功能包括:

  1. 按文件类型自动分类(图片、文档、视频、压缩包等)

  2. 按日期自动归档(今天/本周/本月)

  3. 定时监控整理(配合系统定时任务)

  4. 可配置的规则引擎(满足个性化需求)

代码实现

基础版:按文件类型分类

from pathlib import Path
import shutil
from collections import defaultdict

class FileOrganizer:
"""文件夹自动整理工具"""

# 定义文件类型映射规则
FILE_TYPES = {
'images': ['.jpg''.jpeg''.png''.gif''.bmp''.webp''.svg''.ico'],
'documents': ['.pdf''.doc''.docx''.xls''.xlsx''.ppt''.pptx''.txt''.md'],
'videos': ['.mp4''.avi''.mov''.mkv''.flv''.wmv'],
'audio': ['.mp3''.wav''.flac''.aac''.ogg'],
'archives': ['.zip''.rar''.7z''.tar''.gz'],
'code': ['.py''.js''.html''.css''.java''.cpp''.go''.rs''.sh'],
'data': ['.csv''.json''.xml''.yaml''.yml''.sql'],
    }

def __init__(selfsource_dir):
self.source_dir = Path(source_dir)
self.stats = defaultdict(int)

def get_category(selffile_path):
"""根据扩展名获取文件分类"""
suffix = file_path.suffix.lower()
for categoryextensions in self.FILE_TYPES.items():
if suffix in extensions:
return category
return 'others'

def organize_by_type(self):
"""按文件类型整理"""
print(f"📂 开始整理文件夹: {self.source_dir}")

for file_path in self.source_dir.iterdir():
if not file_path.is_file():
continue

category = self.get_category(file_path)
target_dir = self.source_dir/category

# 创建分类目录
target_dir.mkdir(exist_ok=True)

# 移动文件
target_path = target_dir/file_path.name
if file_path !target_path:  # 避免自身到自身的移动
shutil.move(str(file_path), str(target_path))
self.stats[category] += 1
print(f"  ✅ {file_path.name} → {category}/")

self._print_stats()

def_print_stats(self):
"""打印整理统计"""
print("\n📊 整理完成:")
total = 0
for categorycount in self.stats.items():
print(f"  • {category}: {count} 个文件")
total += count
print(f"  总计移动: {total} 个文件")

使用方式:

# 整理下载文件夹
organizer = FileOrganizer("/Users/用户名/Downloads")
organizer.organize_by_type()

运行后,你会看到类似输出:

📂 开始整理文件夹: /Users/用户名/Downloads
  ✅ report.xlsx → documents/
  ✅ photo.jpg → images/
  ✅ data.csv → data/
  ✅ project.zip → archives/

📊 整理完成:
  • documents: 5 个文件
  • images: 12 个文件
  • data: 3 个文件
  • archives: 2 个文件
  总计移动: 22 个文件

进阶版:按日期归档

很多文件需要按时间管理,比如日志、报表、财务凭证。按日期分类的版本:

from datetime import datetime

class DateFileOrganizer(FileOrganizer):
"""支持按日期归档的文件整理器"""

def get_date_folder(selffile_path):
"""根据文件修改时间计算目标文件夹"""
mtime = datetime.fromtimestamp(file_path.stat().st_mtime)
today = datetime.now()

# 计算天数差距
delta = (today-mtime).days

if delta == 0:
return"今天"
elif delta == 1:
return"昨天"
elif delta<7:
return"本周"
elif delta<30:
return"本月"
else:
return f"{mtime.strftime('%Y-%m')}"

def organize_by_date(self):
"""按文件修改日期整理"""
print(f"📅 按日期整理: {self.source_dir}")

for file_path in self.source_dir.rglob("*"):
if not file_path.is_file():
continue

# 跳过隐藏文件和系统文件夹
if file_path.name.startswith('.'):
continue

date_folder = self.get_date_folder(file_path)
target_dir = self.source_dir date_folder

target_dir.mkdir(exist_ok=True)
target_path = target_dir file_path.name

# 处理重名文件:添加序号
if target_path.exists() and target_path !file_path:
stem = target_path.stem
suffix = target_path.suffix
counter = 1
while target_path.exists():
target_path = target_dir f"{stem}_{counter}{suffix}"
counter += 1

if file_path !target_path:
shutil.move(str(file_path), str(target_path))
self.stats[date_folder] += 1

self._print_stats()

完整版:定时监控整理

如果你希望下载完自动整理(而不是手动执行),可以用watchdog库监控文件夹变化:

# 安装:pip install watchdog
from watchdog.observers import Observer
from watchdog.events import FileSystemEventHandler
import time

class DownloadHandler(FileSystemEventHandler):
"""监控下载文件夹的文件变化"""

def __init__(selforganizer):
self.organizer = organizer
# 只处理新创建的文件
self.pending_files = {}

def on_created(selfevent):
"""文件创建时触发"""
if event.is_directory:
return

file_path = Path(event.src_path)

# 等待文件写入完成(文件大小稳定)
time.sleep(2)

# 检查文件是否还在变化
try:
size1 = file_path.stat().st_size
time.sleep(1)
size2 = file_path.stat().st_size

if size1 == size2:  # 文件写入完成
print(f"\n📥 检测到新文件: {file_path.name}")
self._move_file(file_path)
except Exception as e:
print(f"处理文件出错: {e}")

def _move_file(selffile_path):
"""移动文件到对应分类"""
category = self.organizer.get_category(file_path)
target_dir = self.organizer.source_dir/category

# 创建分类目录
target_dir.mkdir(exist_ok=True)

target_path = target_dir/file_path.name
if target_path.exists():
stem = target_path.stem
suffix = target_path.suffix
target_path = target_dir f"{stem}_{int(time.time())}{suffix}"

try:
shutil.move(str(file_path), str(target_path))
print(f"  ✅ 已整理: {file_path.name} → {category}/")
except Exceptionase:
print(f"  ❌ 移动失败: {e}")

def start_watching(source_dir):
"""启动文件夹监控"""
organizer = FileOrganizer(source_dir)
event_handler = DownloadHandler(organizer)
observer = Observer()

observer.schedule(event_handlersource_dirrecursive=False)
observer.start()

print(f"👀 开始监控文件夹: {source_dir}")
print("按 Ctrl+C 停止监控\n")

try:
while True:
time.sleep(1)
except KeyboardInterrupt:
observer.stop()
print("\n👋 监控已停止")
observer.join()

# 启动监控
if __name__ == "__main__":
start_watching("/Users/用户名/Downloads")

定时任务配置

macOS/Linux:crontab

# 每天早上9点自动整理
09 * * * /usr/bin/python3 /path/to/organizer.py >> ~/logs/organize.log 2>&1

# 每小时整理一次
0 * * * * /usr/bin/python3 /path/to/organizer.py

Windows:任务计划程序

  1. 打开"任务计划程序"

  2. 创建基本任务 → 设置触发器(每天/每周)

  3. 操作选择"启动程序"

  4. 程序路径填写:pythonw.exe

  5. 参数填写:organizer.py

  6. 起始位置填写脚本所在目录

macOS: launchd

创建 ~/Library/LaunchAgents/com.organizer.plist

<?xmlversion="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plistversion="1.0">
<dict>
<key>Label</key>
<string>com.organizer.folder</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/python3</string>
<string>/path/to/organizer.py</string>
</array>
<key>StartCalendarInterval</key>
<dict>
<key>Hour</key>
<integer>9</integer>
<key>Minute</key>
<integer>0</integer>
</dict>
</dict>
</plist>

自定义规则

你可以根据实际需求扩展分类规则:

# 添加自定义分类
organizer.FILE_TYPES['design'] = ['.psd''.ai''.sketch''.fig''.xd']
organizer.FILE_TYPES['temp'] = ['.tmp''.cache''.bak']

# 或者按文件名关键词分类
CUSTOM_KEYWORDS = {
'contract': ['合同''协议''contract''agreement'],
'invoice': ['发票''invoice''账单'],
'report': ['报告''报表''report''数据'],
}

def organize_by_keyword(selffile_path):
"""按文件名关键词分类"""
name_lower = file_path.stem.lower()
for categorykeywords in CUSTOM_KEYWORDS.items():
if any(kw.lower() in name_lower for kw in keywords):
return category
return None

完整脚本下载

整理好的完整可运行脚本已保存到项目目录,包含:

  • 基础版(按类型分类)

  • 日期版(按时间归档)

  • 监控版(实时监控)

  • 自定义配置示例

总结

场景推荐方案
一次性整理历史文件基础版 organize_by_type()
需要按时间查找文件日期版 organize_by_date()
持续保持整洁监控版 start_watching()
每天定时整理配合 crontab 使用基础版

核心就两个库:pathlib 处理路径,shutil 处理移动。学会这两个,你的文件管理能力就已经超过90%的用户了。


相关代码均为标准库或主流库,无需额外安装依赖(除监控功能需要 watchdog 外)

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-07-03 21:43:39 HTTP/2.0 GET : https://f.mffb.com.cn/a/487289.html
  2. 运行时间 : 0.282051s [ 吞吐率:3.55req/s ] 内存消耗:4,615.21kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=9ea9d2839695cca92d2bd57fa58c5623
  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.001161s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.002307s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.009923s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000872s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.002003s ]
  6. SELECT * FROM `set` [ RunTime:0.000720s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.002045s ]
  8. SELECT * FROM `article` WHERE `id` = 487289 LIMIT 1 [ RunTime:0.005867s ]
  9. UPDATE `article` SET `lasttime` = 1783086220 WHERE `id` = 487289 [ RunTime:0.032995s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 66 LIMIT 1 [ RunTime:0.000685s ]
  11. SELECT * FROM `article` WHERE `id` < 487289 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.001125s ]
  12. SELECT * FROM `article` WHERE `id` > 487289 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.008285s ]
  13. SELECT * FROM `article` WHERE `id` < 487289 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.002630s ]
  14. SELECT * FROM `article` WHERE `id` < 487289 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.002993s ]
  15. SELECT * FROM `article` WHERE `id` < 487289 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.013249s ]
0.285343s