当前位置:首页>python>第341讲:VBA和Python双方案:Outlook邮件批量发送(个性化正文+附件)

第341讲:VBA和Python双方案:Outlook邮件批量发送(个性化正文+附件)

  • 2026-08-18 23:11:46
第341讲:VBA和Python双方案:Outlook邮件批量发送(个性化正文+附件)

场景:向不同客户发送定制化的对账单邮件

财务小王每个月都要给上百个客户发对账单:每个客户的金额不一样,附件是对应的Excel明细,正文还要带上客户名称和本月回款情况。手动一封封改,不仅容易漏发错发,光是复制粘贴就要耗掉大半天。其实不管是VBA还是Python,都能通过Outlook的COM接口实现批量自动化发送——两者底层逻辑高度相似,学会一种,另一种也能很快上手。今天我们就结合真实业务场景,把两种方法的实现细节、避坑技巧一次性讲透。

一、先理清业务逻辑:我们要解决什么问题?

在开始写代码前,先把业务流程拆解清楚,避免“为了自动化而自动化”:

  1. 数据源准备:需要一个包含所有客户信息的Excel表,至少包含:客户名称、邮箱地址、本月应收金额、已付金额、未付金额、对应对账单附件路径(比如D:\对账单\2024-05_客户A.xlsx)。

  2. 邮件内容定制:正文不能千篇一律,必须包含客户专属信息(比如“尊敬的客户A:您2024年5月未付金额为12800元”),附件必须精准匹配每个客户的文件。

  3. 发送可靠性:发送前最好能预览,避免错发;发送后能记录状态(比如“已发送”“附件缺失”)。

  4. 异常处理:遇到邮箱格式错误、附件路径不存在的情况,程序不能崩溃,要跳过错误记录并提示。

今天我们用的示例数据源是一个名为客户对账单清单.xlsx的Excel表,结构如下:

客户名称

邮箱地址

应收金额

已付金额

未付金额

附件路径

客户A

a@company.com

20000

7200

12800

D:\对账单\2024-05_客户A.xlsx

客户B

b@company.com

15000

15000

0

D:\对账单\2024-05_客户B.xlsx

二、VBA实现:Outlook自带的“原生武器”

VBA是Office内置的脚本语言,无需额外安装环境,适合Excel深度用户。它通过Outlook.Application创建COM对象,直接调用Outlook的邮件功能。

(一)准备工作:启用Outlook对象库

  1. 打开Excel,按Alt+F11进入VBA编辑器;

  2. 点击「工具」→「引用」,勾选「Microsoft Outlook XX.0 Object Library」(XX对应你的Office版本,比如2016是16.0),否则会报错“用户定义类型未定义”。

(二)核心代码:批量生成并发送邮件

Sub 批量发送对账单()    Dim olApp As Outlook.Application    Dim olMail As Outlook.MailItem    Dim ws As Worksheet    Dim lastRow As Long    Dim i As Long    Dim clientName As String, email As String, attachPath As String    Dim bodyText As String    ' 1. 绑定当前Excel工作表(假设数据在Sheet1)    Set ws = ThisWorkbook.Worksheets("Sheet1")    lastRow = ws.Cells(ws.Rows.Count, 1).End(xlUp).Row ' 获取最后一行数据    ' 2. 创建Outlook应用实例(若Outlook已打开则直接绑定,否则新建)    On Error Resume Next    Set olApp = GetObject(, "Outlook.Application")    If olApp Is Nothing Then        Set olApp = CreateObject("Outlook.Application")    End If    On Error GoTo 0    ' 3. 循环处理每一行客户数据    For i = 2 To lastRow ' 假设第1行是表头,从第2行开始        clientName = ws.Cells(i, 1).Value ' 客户名称(A列)        email = ws.Cells(i, 2).Value ' 邮箱地址(B列)        attachPath = ws.Cells(i, 6).Value ' 附件路径(F列)        ' 校验必填字段:邮箱和附件路径不能为空        If email = "" Or attachPath = "" Then            ws.Cells(i, 7).Value = "失败:邮箱或附件路径为空" ' 在第7列记录状态            GoTo NextRow ' 跳过当前循环        End If        ' 校验附件是否存在        If Dir(attachPath) = "" Then            ws.Cells(i, 7).Value = "失败:附件不存在"            GoTo NextRow        End If        ' 4. 创建邮件对象        Set olMail = olApp.CreateItem(olMailItem)        ' 5. 配置邮件内容(个性化正文)        With olMail            .To = email ' 收件人            .Subject = "2024年5月对账单 - " & clientName ' 主题含客户名称,避免被归为垃圾邮件            ' 正文用HTML格式,支持换行和简单样式(比纯文本更易读)            bodyText = "<p>尊敬的" & clientName & ":</p>"            bodyText = bodyText & "<p>您好!附件为贵司2024年5月对账单,请查收。</p>"            bodyText = bodyText & "<p>本月应收金额:" & Format(ws.Cells(i, 3).Value, "#,##0.00") & "元<br>"            bodyText = bodyText & "本月已付金额:" & Format(ws.Cells(i, 4).Value, "#,##0.00") & "元<br>"            bodyText = bodyText & "未付金额:<strong>" & Format(ws.Cells(i, 5).Value, "#,##0.00") & "元</strong></p>"            bodyText = bodyText & "<p>如有疑问,请联系财务小王:123-4567-8912。</p>"            bodyText = bodyText & "<p>此致<br>XX公司财务部</p>"            .HTMLBody = bodyText            ' 添加附件(注意路径必须是绝对路径)            .Attachments.Add attachPath            ' 发送方式:.Send直接发送;.Display显示邮件窗口(用于预览,适合首次测试)            .Display ' 测试时先用.Display,确认无误后改为.Send        End With        ' 6. 记录发送状态        ws.Cells(i, 7).Value = "已发送"        ws.Cells(i, 7).Interior.Color = RGB(198, 239, 206) ' 成功标绿NextRow:        Set olMail = Nothing ' 释放当前邮件对象,避免内存占用    Next i    ' 7. 清理对象    Set olApp = Nothing    MsgBox "批量发送完成!", vbInformationEnd Sub

(三)VBA关键知识点解析

  1. COM对象创建GetObject(, "Outlook.Application")尝试绑定已打开的Outlook,CreateObject则在Outlook未运行时新建实例——这是VBA操作Outlook的标准写法,避免因Outlook未启动导致报错。

  2. 邮件格式选择.Body是纯文本,.HTMLBody支持HTML标签(如<p>换行、<strong>加粗、Format函数格式化数字为千分位),实际业务中推荐用HTML格式,可读性更强。

  3. 异常处理:通过Dir(attachPath)检查附件是否存在(Dir返回文件名,不存在则返回空字符串),并在Excel中记录失败原因,方便后续排查。

  4. 发送模式:测试阶段务必用.Display弹出邮件窗口,确认正文、附件无误后再改为.Send自动发送——这是避免发错邮件的“保命技巧”。

(四)VBA常见坑点

  • 引用缺失:忘记勾选Outlook对象库,会报“编译错误:用户定义类型未定义”,回到“引用”界面勾选即可。

  • 路径错误:附件路径必须是绝对路径(如D:\对账单\xxx.xlsx),不能用相对路径;若路径含中文,确保Excel和VBA编辑器编码一致(一般默认支持,但老旧系统可能乱码)。

  • Outlook安全提示:首次运行可能会弹出“允许程序发送邮件”的安全警告,需在Outlook信任中心设置(文件→选项→信任中心→信任中心设置→编程访问→勾选“从不向我发出可疑活动警告”,仅限可信环境)。

三、Python实现:win32com.client的“跨平台潜力”

Python通过pywin32库的win32com.client模块操作COM对象,语法和VBA高度相似,但优势在于:可以结合pandas处理复杂数据、用openpyxl读写Excel、集成日志系统,甚至后续扩展为定时任务(比如每月5号自动运行)。

(一)环境准备

  1. 安装Python(3.8+版本,确保和Office位数一致:64位Office装64位Python,32位装32位);

  2. 安装依赖库:pip install pywin32 pandas openpyxl(pandas用于读取Excel,openpyxl支持xlsx格式);

  3. 确保Outlook已登录(COM操作需要Outlook处于运行状态,或在代码中自动启动)。

(二)核心代码:Python批量发送对账单

import win32com.client as win32import pandas as pdimport osfrom datetime import datetimedef batch_send_outlook_emails(excel_path, sheet_name="Sheet1"):    """    批量通过Outlook发送个性化对账单邮件    :param excel_path: 客户清单Excel路径    :param sheet_name: 工作表名称    """    # 1. 读取Excel数据(用pandas处理,比VBA的单元格循环更高效)    try:        df = pd.read_excel(excel_path, sheet_name=sheet_name)        # 确保必要列存在        required_cols = ["客户名称""邮箱地址""应收金额""已付金额""未付金额""附件路径"]        if not all(col in df.columns for col in required_cols):            raise ValueError(f"Excel缺少必要列,需包含:{required_cols}")    except Exception as e:        print(f"读取Excel失败:{e}")        return    # 2. 创建Outlook COM对象(和VBA的CreateObject对应)    try:        outlook = win32.Dispatch("Outlook.Application")        # 若需强制新建Outlook实例(避免复用现有窗口),用DispatchEx:        # outlook = win32.DispatchEx("Outlook.Application")    except Exception as e:        print(f"无法连接Outlook:{e},请确保Outlook已安装并登录")        return    # 3. 新增“发送状态”列,记录结果    df["发送状态"] = ""    success_count = 0    fail_count = 0    # 4. 循环处理每一行数据    for idx, row in df.iterrows():        client_name = row["客户名称"]        email = row["邮箱地址"]        attach_path = row["附件路径"]        # 校验必填字段        if pd.isna(email) or pd.isna(attach_path):            df.at[idx, "发送状态"] = "失败:邮箱或附件路径为空"            fail_count += 1            continue        # 校验附件是否存在        if not os.path.exists(attach_path):            df.at[idx, "发送状态"] = f"失败:附件不存在({attach_path})"            fail_count += 1            continue        try:            # 5. 创建邮件对象(对应VBA的CreateItem(olMailItem))            mail = outlook.CreateItem(0)  # 0=olMailItem,和VBA的枚举值一致            # 6. 配置邮件内容(和VBA的With语句逻辑完全对应)            mail.To = email            mail.Subject = f"2024年5月对账单 - {client_name}"            # HTML正文(和VBA的HTMLBody语法完全一致)            body_html = f"""            <p>尊敬的{client_name}:</p>            <p>您好!附件为贵司2024年5月对账单,请查收。</p>            <p>本月应收金额:{row['应收金额']:,.2f}元<br>            本月已付金额:{row['已付金额']:,.2f}元<br>            未付金额:<strong>{row['未付金额']:,.2f}元</strong></p>            <p>如有疑问,请联系财务小王:123-4567-8912。</p>            <p>此致<br>XX公司财务部</p>            <p><small>本邮件由系统自动发送,请勿直接回复。</small></p>            """            mail.HTMLBody = body_html            # 添加附件(和VBA的.Attachments.Add对应)            mail.Attachments.Add(attach_path)            # 发送方式:.Send()直接发送;.Display()预览(测试用)            mail.Display()  # 测试时用,确认后改为 mail.Send()            # 记录成功状态            df.at[idx, "发送状态"] = f"已发送({datetime.now().strftime('%Y-%m-%d %H:%M')})"            success_count += 1            print(f"成功:{client_name}的邮件已准备就绪")        except Exception as e:            df.at[idx, "发送状态"] = f"失败:{str(e)}"            fail_count += 1            print(f"失败:{client_name}的邮件发送出错 - {e}")    # 7. 保存结果到新Excel(避免覆盖原数据)    output_path = os.path.splitext(excel_path)[0] + "_发送结果.xlsx"    df.to_excel(output_path, index=False)    print(f"\n批量发送完成!成功:{success_count}封,失败:{fail_count}封")    print(f"结果已保存至:{output_path}")if __name__ == "__main__":    # 替换为你的Excel路径(绝对路径)    excel_path = r"D:\客户对账单清单.xlsx"    batch_send_outlook_emails(excel_path)

(三)Python与VBA的核心对应关系

功能

VBA代码

Python代码

说明

创建Outlook实例

CreateObject("Outlook.Application")

win32.Dispatch("Outlook.Application")

两者均通过COM ProgID创建对象

创建邮件对象

olApp.CreateItem(olMailItem)

outlook.CreateItem(0)

olMailItem枚举值为0,Python直接用数值

收件人

.To = email

mail.To = email

属性名完全一致

邮件主题

.Subject = "xxx"

mail.Subject = "xxx"

属性名完全一致

HTML正文

.HTMLBody = bodyText

mail.HTMLBody = body_html

属性名完全一致,HTML语法通用

添加附件

.Attachments.Add(attachPath)

mail.Attachments.Add(attach_path)

方法名完全一致

发送邮件

.Send

mail.Send()

VBA无括号,Python需加括号

显示邮件(预览)

.Display

mail.Display()

调试阶段必备

(四)Python的优势与注意事项

优势:

  1. 数据处理能力强:用pandas读取Excel,支持百万行数据高效处理,还能直接对接数据库(如SQL Server),无需手动整理Excel。

  2. 扩展性更好:可集成日志模块(logging)记录详细错误,用schedule库设置定时任务(比如每月自动运行),甚至对接企业微信/钉钉发送发送通知。

  3. 代码复用性高:写成函数后,其他部门(如销售发报价单)只需修改数据源和正文模板即可复用,而VBA通常绑定特定Excel文件。

注意事项:

  1. 位数一致性:Python和Office的位数必须一致(64位Python+64位Office),否则会出现“无法创建COM对象”的错误(32位Python需安装32位pywin32)。

  2. Outlook安全策略:企业环境中,Outlook可能禁止COM程序自动发送邮件,此时需联系IT管理员在组策略中放行,或改用.Display()手动点击发送(适合敏感场景)。

  3. 路径转义:Windows路径需用原始字符串(r"D:\xxx")或双反斜杠("D:\\xxx"),避免\n被解析为换行符。

四、VBA vs Python:怎么选?

维度

VBA

Python

学习成本

低(Excel用户易上手)

中(需掌握基础Python语法)

环境依赖

无(Office自带)

需安装Python和pywin32

数据处理能力

弱(适合万行以内数据)

强(支持百万行数据+复杂清洗)

调试体验

差(报错信息模糊,无断点调试)

好(可用PyCharm/VSCode断点调试)

适用场景

个人临时任务、Excel重度用户

团队长期任务、大数据量、需扩展功能

一句话建议:偶尔用、数据量小,选VBA;经常用、数据量大或需要和其他系统集成,选Python。

五、避坑指南:90%的人都会遇到的问题

  1. Outlook弹窗拦截:企业环境中,Outlook可能弹出“程序试图发送邮件”的安全警告,解决方法:

    • 临时:勾选“允许访问”并设置10分钟权限;

    • 永久:联系IT在Exchange服务器配置“程序化电子邮件保护”例外。

  2. 附件路径含空格:路径必须用引号包裹?不需要!VBA和Python的Add方法均支持含空格的路径(如"D:\财务文件\对账单.xlsx"),但需确保路径正确。

  3. 中文乱码:正文中文乱码通常是编码问题,VBA中用StrConv转换,Python中确保Excel保存为UTF-8编码(pandas默认支持)。

  4. 发送后邮件留在“草稿箱”:用了.Save()方法会保存到草稿箱,若需直接发送,只用.Send()即可;若需保留副本,可在.Send()前加.SaveSentMessageFolder = outlook.Session.GetDefaultFolder(5)(5对应“已发送邮件”文件夹)。

六、进阶技巧:让自动化更“智能”

  1. 抄送/密送:VBA中.CC = "cc@company.com",Python中mail.CC = "cc@company.com";密送用.BCC

  2. 添加多个附件:循环中多次调用.Attachments.Add即可,比如客户有多个对账单文件时,附件路径用分号分隔,代码中拆分后逐个添加。

  3. 邮件优先级.Importance = 2(VBA:2=高优先级,1=普通,0=低;Python数值相同)。

  4. 嵌入图片:HTML正文中用<img src="cid:image1">,然后通过.Attachments.Add "D:\logo.png", 1, 0, "image1"(第三个参数1表示嵌入,第四个参数是ContentID,需和HTML中的cid一致)。

七、练习题(答案见文末)

  1. 以下关于VBA操作Outlook的说法,正确的是?

    A. 必须先关闭Outlook才能创建Application对象

    B. .HTMLBody不支持表格标签<table>

    C. Dir(attachPath)可用来检查附件是否存在

    D. .Send方法会先将邮件保存到草稿箱

  2. Python中win32com.client.Dispatch("Outlook.Application")的作用是?

    A. 关闭Outlook进程

    B. 创建Outlook应用实例

    C. 删除所有邮件

    D. 读取Outlook联系人

  3. 以下哪种情况会导致COM操作Outlook失败?

    A. Python和Office位数不一致

    B. Excel文件路径含中文

    C. 邮件正文用了HTML格式

    D. 附件路径是绝对路径

  4. VBA中olMailItem的枚举值是?

    A. 0

    B. 1

    C. 5

    D. 9

  5. 关于Python和VBA的对比,错误的是?

    A. 两者都通过COM接口操作Outlook

    B. Python的数据处理能力更强

    C. VBA需要额外安装环境

    D. 两者的邮件属性名(如.To、.Subject)基本一致

答案

  1. C 2. B 3. A 4. A 5. C


总结:无论是VBA还是Python,批量发送Outlook邮件的核心都是通过COM接口调用Outlook的对象模型,语法逻辑高度对应。掌握这套思路,不仅能解决对账单发送问题,还能扩展到报价单、邀请函等各类批量邮件场景。下次再遇到重复发邮件的需求,不妨试试自动化——把时间留给更有价值的工作吧!


最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-08-21 18:54:58 HTTP/2.0 GET : https://f.mffb.com.cn/a/509088.html
  2. 运行时间 : 0.229010s [ 吞吐率:4.37req/s ] 内存消耗:4,670.88kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=97852d08a92f0a38522dd9195a9435ff
  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.000841s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.001345s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.000632s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000687s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.001593s ]
  6. SELECT * FROM `set` [ RunTime:0.000573s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.001492s ]
  8. SELECT * FROM `article` WHERE `id` = 509088 LIMIT 1 [ RunTime:0.006326s ]
  9. UPDATE `article` SET `lasttime` = 1787309698 WHERE `id` = 509088 [ RunTime:0.009040s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 66 LIMIT 1 [ RunTime:0.000732s ]
  11. SELECT * FROM `article` WHERE `id` < 509088 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.006639s ]
  12. SELECT * FROM `article` WHERE `id` > 509088 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.004317s ]
  13. SELECT * FROM `article` WHERE `id` < 509088 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.005381s ]
  14. SELECT * FROM `article` WHERE `id` < 509088 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.008169s ]
  15. SELECT * FROM `article` WHERE `id` < 509088 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.022309s ]
0.233006s