当前位置:首页>python>15个自动化脚本,让 Python 替你干活

15个自动化脚本,让 Python 替你干活

  • 2026-02-10 11:59:53
15个自动化脚本,让 Python 替你干活

打工人效率开挂!Python 自动化脚本「即拿即用」日常办公、数据处理、运维部署、爬虫 / 定时任务… 全场景覆盖!文件操作、自动发邮件、数据清洗、图片处理、日志分析、远程部署等超实用功能,代码简单到新手也能懂,复制粘贴直接跑,告别机械重复活,效率直接翻倍!

1. 批量文件重命名:几百个文件 10 秒改完

还在手动给文件改名字?这个脚本支持自定义前缀 / 后缀,按序号批量重命名,不管是图片、文档还是视频,指定文件夹就能一键处理

import osdef batch_rename(path, prefix='', suffix=''):    # 遍历目标文件夹下的所有文件    for i, filename in enumerate(os.listdir(path)):        # 拼接新文件名:前缀+3位序号+后缀+原文件后缀        new_name = f"{prefix}{i:03d}{suffix}{os.path.splitext(filename)[1]}"        old_file = os.path.join(path, filename)        new_file = os.path.join(path, new_name)        os.rename(old_file, new_file)  # 执行重命名# 使用示例:给/path/to/your/directory下的文件加前缀file_、后缀.txtbatch_rename('/path/to/your/directory''file_''.txt')

2. 自动发送邮件通知:告别手动写邮件

定时发日报、催交材料、推送提醒?不用打开邮箱,脚本填好收件人、主题和内容,一键发送,还能扩展添加附件、抄送等功能。

import smtplibfrom email.mime.text import MIMETextdef send_email(to_addr, subject, content):    # 配置邮箱服务器(以QQ/163邮箱为例,替换成对应smtp地址)    smtp_server = 'smtp.example.com'    username = 'your-email@example.com'  # 发件人邮箱    password = 'your-password'  # 邮箱授权码(非登录密码)    # 构建邮件内容    msg = MIMEText(content)    msg['Subject'] = subject    msg['From'] = username    msg['To'] = to_addr    # 连接服务器并发送邮件    server = smtplib.SMTP(smtp_server, 587)    server.starttls()    server.login(username, password)    server.sendmail(username, to_addr, msg.as_string())    server.quit()# 使用示例:给receiver@example.com发送「每日报告提醒」邮件send_email('receiver@example.com''每日报告提醒''今日报告已生成,请查收。')

4. 数据库操作自动化:简化 CRUD 操作

不用手动写 SQL 语句,脚本封装了数据库连接、数据插入功能,支持增删改查,适配 SQLite/MySQL(改连接方式即可)。

import sqlite3def create_connection(db_file):    # 创建数据库连接    conn = None    try:        conn = sqlite3.connect(db_file)        print(f"成功连接到SQLite数据库: {db_file}")    except sqlite3.Error as e:        print(e)    return conndef insert_data(conn, table_name, data_dict):    # 拼接插入SQL语句(数据字典:键=字段名,值=字段值)    keys = ', '.join(data_dict.keys())    values = ', '.join(f"'{v}'" for v in data_dict.values())    sql = f"INSERT INTO {table_name} ({keys}) VALUES ({values});"    try:        cursor = conn.cursor()        cursor.execute(sql)        conn.commit()  # 提交事务    except sqlite3.Error as e:        print(e)# 使用示例:连接my_database.db,往users表插入一条用户数据conn = create_connection('my_database.db')data = {'name''John Doe''age'30}insert_data(conn, 'users', data)conn.close()  # 关闭数据库连接

5. 网页内容抓取:一键爬取需要的信息

想批量获取网页标题、商品价格、新闻内容?用 requests+BeautifulSoup,几行代码就能爬取网页数据,支持翻页、多链接批量爬取。

import requestsfrom bs4 import BeautifulSoupdef fetch_web_content(url):    # 发送请求获取网页内容    response = requests.get(url)    if response.status_code == 200:  # 请求成功        soup = BeautifulSoup(response.text, 'html.parser')        title = soup.find('title').text  # 提取网页标题(可替换成其他内容)        return title    else:        return "无法获取网页内容"# 使用示例:爬取https://example.com的网页标题url = 'https://example.com'web_title = fetch_web_content(url)print("网页标题: ", web_title)

6. 数据清洗自动化:告别手动整理表格

Excel/CSV 表格里的缺失值、重复行、格式错误?用 Pandas 一键处理,支持缺失值填充、重复值删除、字段类型转换,秒级完成海量数据清洗

import pandas as pddef clean_data(file_path):    # 读取CSV文件(可替换成read_excel读取Excel)    df = pd.read_csv(file_path)    # 填充缺失值为N/A    df.fillna('N/A', inplace=True)    # 删除重复行    df.drop_duplicates(inplace=True)    # 把date_column列转换成日期格式    df['date_column'] = pd.to_datetime(df['date_column'])    return df# 使用示例:清洗data.csv文件cleaned_df = clean_data('data.csv')print("数据清洗完成,已准备就绪!")

7. 图片批量压缩:节省存储空间

手机 / 相机拍的高清图片太大?批量压缩图片大小,保留清晰度的同时减少体积,支持 jpg/png 格式,自定义压缩质量

from PIL import Imageimport osdef compress_images(dir_path, quality=90):    # 遍历目标文件夹下的图片文件    for filename in os.listdir(dir_path):        if filename.endswith(".jpg"or filename.endswith(".png"):            img = Image.open(os.path.join(dir_path, filename))            # 保存压缩后的图片(加前缀compressed_区分原文件)            img.save(os.path.join(dir_path, f'compressed_{filename}'), optimize=True, quality=quality)# 使用示例:压缩/path/to/images下的图片,质量80(数值越小压缩率越高)compress_images('/path/to/images', quality=80)

8. 文件内容批量替换:一键修改多文件内容

需要修改多个文档里的相同文字?比如把 “旧地址” 换成 “新地址”、“2025” 改成 “2026”,指定文件夹就能批量替换,支持 txt、py、md 等格式。

import fileinputdef search_replace_in_files(dir_path, search_text, replace_text):    # 遍历目标文件夹下的所有文件,逐行替换内容    for line in fileinput.input([f"{dir_path}/*"], inplace=True):        print(line.replace(search_text, replace_text), end='')# 使用示例:把/path/to/files下的old_text替换成new_textsearch_replace_in_files('/path/to/files''old_text''new_text')

9. 日志文件分析:快速统计关键信息

服务器日志、系统日志里找错误?脚本一键统计 ERROR 行数,也可扩展统计警告、访问量等,不用手动翻几万行日志。

def analyze_log(log_file):    # 读取日志文件    with open(log_file, 'r'as f:        lines = f.readlines()    error_count = 0    # 统计包含ERROR的行数    for line in lines:        if "ERROR" in line:            error_count += 1    print(f"日志文件中包含 {error_count} 条错误记录。")# 使用示例:分析application.log中的错误记录数analyze_log('application.log')

10. 数据可视化自动化:一键生成图表

Excel 做图表太麻烦?用 Matplotlib+Pandas,读取 CSV/Excel 数据,一键生成柱状图、折线图、饼图,支持自定义标题、坐标轴。

import matplotlib.pyplot as pltimport pandas as pddef visualize_data(data_file):    # 读取数据文件    df = pd.read_csv(data_file)    # 绘制柱状图(x轴=category列,y轴=value列)    df.plot(kind='bar', x='category', y='value')    plt.title('数据分布')  # 图表标题    plt.xlabel('类别')     # x轴标签    plt.ylabel('值')       # y轴标签    plt.show()  # 显示图表# 使用示例:根据data.csv生成柱状图visualize_data('data.csv')

11. 邮件附件批量下载:自动保存所有附件

邮箱里几十封邮件的附件要手动下载?脚本连接邮箱,一键下载所有邮件的附件,指定保存路径,不用逐个点开邮件。

import imaplibimport emailfrom email.header import decode_headerimport osdef download_attachments(email_addr, password, imap_server, folder='INBOX'):    # 连接IMAP邮箱服务器    mail = imaplib.IMAP4_SSL(imap_server)    mail.login(email_addr, password)    # 选择收件箱    mail.select(folder)    result, data = mail.uid('search'None"ALL")    uids = data[0].split()    # 遍历所有邮件    for uid in uids:        _, msg_data = mail.uid('fetch', uid, '(RFC822)')        raw_email = msg_data[0][1].decode("utf-8")        email_message = email.message_from_string(raw_email)        # 提取邮件附件        for part in email_message.walk():            if part.get_content_maintype() == 'multipart':                continue            if part.get('Content-Disposition'is None:                continue            filename = part.get_filename()            if bool(filename):                # 保存附件到指定路径                file_data = part.get_payload(decode=True)                with open(os.path.join('/path/to/download', filename), 'wb'as f:                    f.write(file_data)    mail.close()

12. 定时发送报告:自动生成 + 发送数据报告

每天 / 每周要发数据报告?脚本自动读取数据、生成 HTML 格式报告,再通过邮件发送,不用手动做表格、写邮件

import pandas as pdimport smtplibfrom email.mime.text import MIMETextfrom email.mime.multipart import MIMEMultipartdef generate_report(source, to_addr, subject):    # 读取数据并生成HTML格式报告(可替换成自己的报表逻辑)    report_content = pd.DataFrame({"Data": [123], "Info": ["A""B""C"]}).to_html()    # 构建带HTML内容的邮件    msg = MIMEMultipart()    msg['From'] = 'your-email@example.com'    msg['To'] = to_addr    msg['Subject'] = subject    msg.attach(MIMEText(report_content, 'html'))    # 发送邮件    server = smtplib.SMTP('smtp.example.com'587)    server.starttls()    server.login('your-email@example.com''your-password')    text = msg.as_string()    server.sendmail('your-email@example.com', to_addr, text)    server.quit()# 使用示例:生成data.csv的报告并发送给receiver@example.comgenerate_report('data.csv''receiver@example.com''每日数据报告')# 搭配第3个定时脚本,可实现每天自动发送

13. 自动化性能测试:压测 API 接口

上线前要测试接口抗压能力?用 Locust 写性能测试脚本,模拟多用户并发访问,统计接口响应时间、成功率。

from locust import HttpUser, task, betweenclass WebsiteUser(HttpUser):    wait_time = between(515)  # 模拟用户操作间隔5-15秒    @task  # 定义测试任务(默认权重)    def load_test_api(self):        # 测试GET接口/api/data,验证返回状态码200        response = self.client.get("/api/data")        assert response.status_code == 200    @task(3)  # 权重3倍:执行频率是其他任务的3倍    def post_data(self):        # 测试POST接口/api/submit,验证返回状态码201        data = {"key""value"}        response = self.client.post("/api/submit", json=data)        assert response.status_code == 201# 启动命令(终端执行):# locust -f your_test_script.py --host=http://your-api-url.com

14. 自动化部署与回滚:一键部署项目

开发完代码要手动登录服务器部署?脚本通过 SSH 连接服务器,一键拉取代码、安装依赖、重启服务,出问题还能快速回滚。

from fabric import Connectiondef deploy(host_string, user, password, project_path, remote_dir):    # 连接远程服务器    c = Connection(host=host_string, user=user, connect_kwargs={"password": password})    # 进入项目目录执行部署命令    with c.cd(remote_dir):        c.run('git pull origin master')  # 拉取最新代码        c.run('pip install -r requirements.txt')  # 安装依赖        c.run('python manage.py migrate')  # 数据库迁移(Django项目)        c.run('python manage.py collectstatic --noinput')  # 收集静态文件        c.run('supervisorctl restart your_project_name')  # 重启服务# 使用示例:部署项目到指定服务器deploy(    host_string='your-server-ip',  # 服务器IP    user='deploy_user',            # 登录用户名    password='deploy_password',    # 登录密码    project_path='/path/to/local/project',  # 本地项目路径    remote_dir='/path/to/remote/project'    # 服务器项目路径)# 回滚:可基于git reset --hard 版本号实现,或恢复备份文件

15. PDF 批量处理:合并 / 提取文本一键搞定

工作中需要合并多个 PDF、提取 PDF 里的文字?不用安装付费软件,Python 脚本支持批量合并 PDF 文件、提取文本内容,效率直接翻倍,还能避免格式错乱

from PyPDF2 import PdfMerger, PdfReaderdef merge_pdfs(input_paths, output_path):    """批量合并PDF文件"""    merger = PdfMerger()    # 遍历所有要合并的PDF路径    for path in input_paths:        merger.append(path)  # 添加PDF文件    merger.write(output_path)  # 保存合并后的PDF    merger.close()    print(f"PDF合并完成!保存路径:{output_path}")def extract_pdf_text(pdf_path, output_txt_path):    """提取PDF文件中的文本内容"""    reader = PdfReader(pdf_path)    text_content = ""    # 遍历PDF所有页面,提取文本    for page in reader.pages:        text_content += page.extract_text() + "\n"    # 保存提取的文本到TXT文件    with open(output_txt_path, 'w', encoding='utf-8'as f:        f.write(text_content)    print(f"文本提取完成!保存路径:{output_txt_path}")# 使用示例1:合并3个PDF文件到merged.pdfinput_pdfs = ["file1.pdf""file2.pdf""file3.pdf"]merge_pdfs(input_pdfs, "merged.pdf")# 使用示例2:提取example.pdf的文本到output.txtextract_pdf_text("example.pdf""output.txt")

#以上 

15个自动化脚本的完整可运行代码,我已经整理成了【一键复制版】,包含详细注释使用说明,不用自己改任何参数!想要的朋友直接在、关注祝,后台回复【123】无偿分享。#Python#数据库#办公室自动化##数据分析#大数据

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-02-10 15:30:14 HTTP/2.0 GET : https://f.mffb.com.cn/a/474751.html
  2. 运行时间 : 0.426676s [ 吞吐率:2.34req/s ] 内存消耗:4,824.24kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=5f8ab9ffb5bf1ae99d5ab41e5f525421
  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.000799s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.001485s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.013641s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.001228s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.001303s ]
  6. SELECT * FROM `set` [ RunTime:0.007465s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.001631s ]
  8. SELECT * FROM `article` WHERE `id` = 474751 LIMIT 1 [ RunTime:0.001640s ]
  9. UPDATE `article` SET `lasttime` = 1770708614 WHERE `id` = 474751 [ RunTime:0.017891s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 66 LIMIT 1 [ RunTime:0.001257s ]
  11. SELECT * FROM `article` WHERE `id` < 474751 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.012214s ]
  12. SELECT * FROM `article` WHERE `id` > 474751 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.014062s ]
  13. SELECT * FROM `article` WHERE `id` < 474751 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.093205s ]
  14. SELECT * FROM `article` WHERE `id` < 474751 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.071986s ]
  15. SELECT * FROM `article` WHERE `id` < 474751 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.022031s ]
0.432456s