当前位置:首页>python>第343讲:对比Python和VBA两种主流实现方式:钉钉/飞书/企业微信消息自动推送

第343讲:对比Python和VBA两种主流实现方式:钉钉/飞书/企业微信消息自动推送

  • 2026-08-21 11:08:48
第343讲:对比Python和VBA两种主流实现方式:钉钉/飞书/企业微信消息自动推送

场景:报表生成完成后自动推送摘要消息到群聊

在企业日常数据运营中,“报表做完了,但忘了发群里”是高频痛点。尤其是财务日报、运营周报、库存预警这类时效性强的数据,一旦漏发,轻则影响决策效率,重则导致业务损失。今天我们就从实际工作场景出发,对比Python和VBA两种主流实现方式,手把手教你实现“报表生成即自动推送群聊”的自动化流程。


一、为什么需要消息自动推送?先看真实场景

假设你是电商公司的数据分析师,每天早上9点需要把“昨日核心经营指标”(GMV、客单价、转化率、库存预警)整理成Excel报表,并发到“经营分析群”。传统流程是:

  1. 打开Excel → 刷新数据透视表 → 核对指标 → 保存文件;

  2. 切到钉钉/飞书 → 找到群聊 → 手动输入“昨日GMV 120万,客单价85元…” → 上传附件 → 点击发送。

这个流程至少耗时3分钟,但如果遇到数据异常需要反复核对,很容易忘记发送;如果同时负责多个部门的报表,漏发概率更高。

自动推送的价值:将“人工操作”转化为“程序触发”,报表生成后自动读取关键指标,调用群机器人接口发送消息,全程无需人工干预。不仅降低出错率,还能让团队第一时间获取数据。


二、核心原理:Webhook机器人的“通信协议”

钉钉、飞书、企业微信的群机器人,本质是通过Webhook URL接收HTTP POST请求,解析请求体中的JSON数据后,在群内渲染成消息卡片。

简单来说,你需要完成三步:

  1. 创建机器人:在群设置中添加自定义机器人,获取唯一的Webhook地址(相当于机器人的“手机号”);

  2. 构造消息体:按平台要求的JSON格式,组织要发送的内容(文本、链接、卡片等);

  3. 发送请求:通过代码向Webhook地址发送POST请求,携带消息体,触发机器人发送消息。

接下来我们分别用Python和VBA实现这三步,并对比两者的差异。


三、Python实现:用requests调用Webhook,生态优势拉满

Python的优势在于丰富的第三方库(如requests简化HTTP请求、json处理序列化)和清晰的语法,适合快速开发和后期维护。我们以“钉钉群机器人”为例,演示完整流程。

3.1 准备工作:获取Webhook地址

  1. 打开钉钉群 → 右上角“设置” → “智能群助手” → “添加机器人” → 选择“自定义”;

  2. 勾选“加签”(增强安全性,可选但推荐)→ 复制生成的Webhook地址(形如https://oapi.dingtalk.com/robot/send?access_token=xxx);

  3. 记录“加签密钥”(若开启),用于生成签名(防止URL被恶意调用)。

3.2 代码实现:从报表读取到消息发送

假设我们的Excel报表(路径:D:\日报\经营指标.xlsx)中,关键指标存放在Sheet1的A1:B4区域(A列是指标名,B列是数值):

指标

数值

GMV

1200000

客单价

85

转化率

3.2%

库存预警

15款

我们需要读取这些指标,构造消息并发送。

步骤1:安装依赖库

pip install requests pandas openpyxl

pandas用于读取Excel,openpyxl是Excel引擎)

步骤2:读取Excel中的关键指标

import pandas as pddef read_report_data(excel_path):    """从Excel读取关键指标"""    df = pd.read_excel(excel_path, sheet_name="Sheet1", usecols="A:B", header=None)    # 转换为字典:{"GMV": 1200000, "客单价": 85, ...}    data_dict = dict(zip(df.iloc[:, 0], df.iloc[:, 1]))    return data_dictexcel_path = r"D:\日报\经营指标.xlsx"report_data = read_report_data(excel_path)

步骤3:构造钉钉消息体(含加签)

钉钉的消息体需要符合官方格式,文本消息的结构如下:

{    "msgtype""text",    "text": {        "content""消息内容"    },    "at": {        "isAtAll"false  # 是否@所有人    }}

如果开启了加签,还需要在请求头中添加签名。签名生成规则是:

timestamp + "\n" + 密钥→ HMAC-SHA256加密 → Base64编码 → URL编码。

import timeimport hmacimport hashlibimport base64import urllib.parseimport jsondef generate_dingtalk_sign(secret):    """生成钉钉加签签名"""    timestamp = str(round(time.time() * 1000))    secret_enc = secret.encode("utf-8")    string_to_sign = f"{timestamp}\n{secret}".encode("utf-8")    sign = base64.b64encode(        hmac.new(secret_enc, string_to_sign, digestmod=hashlib.sha256).digest()    ).decode("utf-8")    sign = urllib.parse.quote_plus(sign)    return timestamp, signdef build_text_message(content, at_all=False):    """构造文本消息体"""    return {        "msgtype""text",        "text": {"content": content},        "at": {"isAtAll": at_all}    }

步骤4:发送POST请求

使用requests.post发送请求,自动处理JSON序列化和HTTP连接。

import requestsdef send_dingtalk_msg(webhook, secret, content, at_all=False):    """发送钉钉消息"""    timestamp, sign = generate_dingtalk_sign(secret)    # 拼接带签名的URL    webhook_with_sign = f"{webhook}&timestamp={timestamp}&sign={sign}"    # 构造消息体    msg = build_text_message(content, at_all)    # 发送POST请求    headers = {"Content-Type""application/json; charset=utf-8"}    response = requests.post(        url=webhook_with_sign,        headers=headers,        data=json.dumps(msg)  # requests自动序列化JSON    )    # 检查响应    if response.status_code == 200:        result = response.json()        if result["errcode"] == 0:            print("消息发送成功!")        else:            print(f"发送失败:{result['errmsg']}")    else:        print(f"HTTP错误:{response.status_code}")# 配置参数(替换为自己的Webhook和密钥)WEBHOOK = "https://oapi.dingtalk.com/robot/send?access_token=xxx"SECRET = "你的加签密钥"# 构造消息内容content = f"""📊 昨日经营指标速报:GMV:{report_data['GMV']:,}元(环比+5%)客单价:{report_data['客单价']}元(环比+2%)转化率:{report_data['转化率']}库存预警:{report_data['库存预警']}(需重点关注)👉 详情见附件:[经营指标.xlsx](附件链接)"""# 发送消息(@所有人可设at_all=True)send_dingtalk_msg(WEBHOOK, SECRET, content, at_all=False)

3.3 Python的“生态红利”:为什么它更适合复杂场景?

上面的代码只是基础版,Python的优势在扩展能力

  • 附件发送:结合requests上传文件到云存储(如阿里云OSS),再将链接嵌入消息;

  • 多平台适配:只需修改消息体结构,即可对接飞书(content改为post类型)、企业微信(msgtypetextnews);

  • 异常处理:用try-except捕获网络超时、Excel读取失败等异常,添加重试机制;

  • 定时任务:用schedule库设置每天9点自动运行脚本,实现“无人值守”。

例如,添加重试机制的代码片段:

from retrying import retry@retry(stop_max_attempt_number=3, wait_fixed=2000)def send_msg_with_retry(webhook, secret, content):    send_dingtalk_msg(webhook, secret, content)# 调用send_msg_with_retry(WEBHOOK, SECRET, content)

四、VBA实现:用XMLHTTP60发送POST请求,老环境救星

VBA的优势是原生集成于Office(无需额外安装环境),适合“只能在Excel内完成全流程”的场景(如企业IT限制安装Python)。但VBA的HTTP请求和JSON处理需要手动实现,代码复杂度较高。

4.1 准备工作:引用XMLHTTP对象

  1. 打开Excel → 按Alt+F11进入VBA编辑器 → 菜单栏“工具” → “引用”;

  2. 勾选“Microsoft XML, v6.0”(提供XMLHTTP60对象,用于发送HTTP请求)。

4.2 代码实现:从读取单元格到发送请求

步骤1:读取Excel中的关键指标

Function ReadReportData() As Dictionary    Dim dict As New Dictionary    Dim ws As Worksheet    Set ws = ThisWorkbook.Sheets("Sheet1")    ' 读取A1:B4的指标(假设无空值)    dict.Add "GMV", ws.Range("B1").Value    dict.Add "客单价", ws.Range("B2").Value    dict.Add "转化率", ws.Range("B3").Value    dict.Add "库存预警", ws.Range("B4").Value    Set ReadReportData = dictEnd Function

步骤2:构造JSON消息体(手动序列化)

VBA没有内置JSON库,需要手动拼接字符串(这是最容易出错的环节!)。例如,文本消息的JSON结构:

{    "msgtype": "text",    "text": { "content": "消息内容" },    "at": { "isAtAll": false }}

对应的VBA拼接代码:

Function BuildTextMessage(content As StringOptional atAll As Boolean = FalseAs String    Dim json As String    json = "{""msgtype"":""text""," & _           """text"":{""content"":""" & content & """}," & _           """at"":{""isAtAll"":" & IIf(atAll, "true""false") & "}}"    BuildTextMessage = jsonEnd Function

⚠️ 注意:如果content中包含双引号(如"),需要转义为\",否则JSON会格式错误。例如:

content = "包含""双引号""的内容"' 拼接时需替换:content = Replace(content, """""\""")

步骤3:生成钉钉加签(VBA实现)

钉钉的加签需要HMAC-SHA256加密,VBA可通过ADODB.StreamCAPICOM组件实现(需系统支持):

Function GenerateDingtalkSign(secret As String) As String    Dim timestamp As String    timestamp = CStr(Round((Timer * 1000 + DateDiff("s", "1970-01-01", Now())) * 1000))    Dim stringToSign As String    stringToSign = timestamp & vbLf & secret    ' HMAC-SHA256加密    Dim hmac As Object    Set hmac = CreateObject("System.Security.Cryptography.HMACSHA256")    hmac.Key = StrConv(secret, vbFromUnicode)    Dim bytes() As Byte    bytes = StrConv(stringToSign, vbFromUnicode)    Dim hashBytes() As Byte    hashBytes = hmac.ComputeHash_2(bytes)    ' Base64编码    Dim base64Str As String    With CreateObject("MSXML2.DOMDocument").createElement("tmp")        .DataType = "bin.base64"        .nodeTypedValue = hashBytes        base64Str = .Text    End With    ' URL编码    GenerateDingtalkSign = timestamp & "&sign=" & URLEncode(base64Str)End Function' URL编码辅助函数Function URLEncode(ByVal str As String) As String    Dim i As Integer, c As String, res As String    For i = 1 To Len(str)        c = Mid(str, i, 1)        If c Like "[A-Za-z0-9._~-]" Then            res = res & c        Else            res = res & "%" & Right("0" & Hex(Asc(c)), 2)        End If    Next    URLEncode = resEnd Function

步骤4:发送POST请求(XMLHTTP60)

Sub SendDingtalkMsg()    Dim webhook As String    Dim secret As String    Dim reportData As Dictionary    Dim content As String    Dim jsonBody As String    Dim http As MSXML2.XMLHTTP60    Dim response As String    Dim signPart As String    ' 配置参数(替换为自己的Webhook和密钥)    webhook = "https://oapi.dingtalk.com/robot/send?access_token=xxx"    secret = "你的加签密钥"    ' 读取报表数据    Set reportData = ReadReportData    ' 构造消息内容    content = "📊 昨日经营指标速报:" & vbCrLf & _              "GMV:" & Format(reportData("GMV"), "#,##0") & "元(环比+5%)" & vbCrLf & _              "客单价:" & reportData("客单价") & "元(环比+2%)" & vbCrLf & _              "转化率:" & reportData("转化率") & vbCrLf & _              "库存预警:" & reportData("库存预警") & "(需重点关注)" & vbCrLf & _              "👉 详情见附件:[经营指标.xlsx]"    ' 构造JSON消息体    jsonBody = BuildTextMessage(content, False)    ' 生成签名并拼接URL    signPart = GenerateDingtalkSign(secret)    webhook = webhook & "&timestamp=" & Split(signPart, "&")(0) & "&sign=" & Split(signPart, "&")(1)    ' 发送POST请求    Set http = New MSXML2.XMLHTTP60    With http        .Open "POST", webhook, False        .setRequestHeader "Content-Type""application/json; charset=utf-8"        .send jsonBody        response = .responseText    End With    ' 检查响应    If InStr(response, """errcode"":0") > 0 Then        MsgBox "消息发送成功!", vbInformation    Else        MsgBox "发送失败:" & response, vbCritical    End If    Set http = Nothing    Set reportData = NothingEnd Sub

4.3 VBA的痛点:JSON序列化与调试难度

对比Python,VBA的实现有两个明显短板:

  1. JSON序列化繁琐:需要手动拼接字符串,一旦内容包含特殊字符(如换行符、双引号),极易出现格式错误;

  2. 调试困难:HTTP请求的异常(如网络超时)只能通过On Error Resume Next捕获,无法像Python那样打印详细堆栈信息;

  3. 扩展性差:若需要发送富文本、卡片消息,JSON结构会更复杂,代码维护成本陡增。

因此,VBA更适合简单场景(如固定格式的日报推送),复杂需求建议优先用Python。


五、Python vs VBA:核心差异对比

对比维度

Python

VBA

环境依赖

需要安装Python及第三方库

Office自带,无需额外安装

JSON处理

json.dumps()自动序列化,支持复杂结构

手动拼接字符串,易出错

HTTP请求

requests库封装完善,支持会话、重试

XMLHTTP60需手动设置请求头、处理响应

扩展性

可对接数据库、云存储、定时任务等

仅限Office内部操作,跨系统能力弱

学习成本

语法简洁,适合新手

需熟悉VBA对象和API,调试门槛高

适用场景

复杂自动化、多平台集成、长期维护

简单推送、Office内闭环流程、旧系统兼容


六、避坑指南:三个常见问题解决

问题1:Webhook地址泄露怎么办?

  • 务必开启“加签”(钉钉/飞书)或“IP白名单”(企业微信),限制调用来源;

  • 不要将Webhook硬编码在代码中,建议存储在环境变量或配置文件里。

问题2:消息发送成功但群内不显示?

  • 检查机器人是否被群管理员禁言;

  • 确认消息体的msgtype是否符合平台要求(如企业微信的text消息不支持@某人,需用mentioned_list字段)。

问题3:VBA发送中文乱码?

  • 确保Content-Type设置为application/json; charset=utf-8

  • 字符串拼接时使用StrConv转换为UTF-8编码(如StrConv(content, vbFromUnicode))。


七、实战练习:5道选择题(答案见文末)

  1. 钉钉群机器人的Webhook URL中,access_token的作用是?(单选)

    A. 标识机器人所属企业

    B. 验证请求合法性

    C. 指定消息类型

    D. 记录发送时间

  2. Python中,以下哪个库最适合处理HTTP请求?(单选)

    A. json

    B. requests

    C. pandas

    D. openpyxl

  3. VBA中构造JSON消息体时,若内容包含双引号,正确的处理方式是?(单选)

    A. 直接拼接

    B. 替换为\'

    C. 替换为\"

    D. 删除双引号

  4. 关于Python和VBA的消息推送实现,以下说法正确的是?(多选)

    A. Python的requests库自动处理JSON序列化

    B. VBA需要通过XMLHTTP60对象发送POST请求

    C. 钉钉的加签需要用到HMAC-SHA256加密

    D. VBA的JSON序列化比Python更简单

  5. 企业微信机器人发送文本消息时,msgtype应设置为?(单选)

    A. text

    B. markdown

    C. news

    D. image


答案

  1. B

  2. B

  3. C

  4. ABC

  5. A


最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-08-21 14:43:25 HTTP/2.0 GET : https://f.mffb.com.cn/a/509413.html
  2. 运行时间 : 0.295295s [ 吞吐率:3.39req/s ] 内存消耗:4,619.28kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=997ec9a4b548cb0ba070720ef2f0437a
  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.001083s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.001370s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.020781s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.021213s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.001672s ]
  6. SELECT * FROM `set` [ RunTime:0.005361s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.001657s ]
  8. SELECT * FROM `article` WHERE `id` = 509413 LIMIT 1 [ RunTime:0.015528s ]
  9. UPDATE `article` SET `lasttime` = 1787294606 WHERE `id` = 509413 [ RunTime:0.004784s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 66 LIMIT 1 [ RunTime:0.000660s ]
  11. SELECT * FROM `article` WHERE `id` < 509413 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.001202s ]
  12. SELECT * FROM `article` WHERE `id` > 509413 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.001109s ]
  13. SELECT * FROM `article` WHERE `id` < 509413 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.012815s ]
  14. SELECT * FROM `article` WHERE `id` < 509413 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.002356s ]
  15. SELECT * FROM `article` WHERE `id` < 509413 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.027600s ]
0.301637s