当前位置:首页>python>Day4:Python自动发邮件教程

Day4:Python自动发邮件教程

  • 2026-06-30 09:51:37
Day4:Python自动发邮件教程

Python自动发邮件+通知提醒,让你的程序"会说话"


一、你的程序需要一个"通知系统"


想象这样一个场景:

你的自动化脚本运行了一个小时,终于处理完了1000份Excel报表。

但你不知道它什么时候跑完的——你一直在刷手机等它。

更尴尬的是

  • 脚本跑了一半报错,你在半小时后才发现
  • 需要发给客户的报告生成了,你忘记手动发出去
  • 监控脚本检测到异常,但没人收到提醒

这就是 Day4 要解决的问题:让你的程序"开口说话"

通知是自动化的"最后一公里"——没有通知的自动化,就像发射了火箭却不看落点。


二、邮件通知:职场最通用的"通信协议"


为什么邮件是最佳选择?

场景
邮件的优势
正式报告
有记录、可归档、带附件
批量通知
一次性发给多人,支持抄送/密送
异常告警
到达率高,不会被忽略
定时提醒
支持定时发送,结合任务调度

邮件是职场"最大公约数"——每个人都会用,每个公司都有。


三、Python发邮件:从0到1


Python 内置 smtplib 和 email 库,无需安装额外依赖就能发邮件。

3.1 第一步:基础配置

发送邮件需要以下信息(以 QQ 邮箱为例):

SMTP服务器:smtp.qq.com
SMTP端口:465(SSL)或 587(TLS)
邮箱账号:你的QQ号@qq.com
授权码:在QQ邮箱设置中开启SMTP服务后获取

获取授权码的步骤

  1. 登录 QQ 邮箱网页版
  2. 点击「设置」→「账户」
  3. 找到「POP3/IMAP/SMTP/Exchange/CardDAV/CalDAV服务」
  4. 开启「SMTP服务」,会显示授权码(16位字符串)
  5. 保存好授权码,它只显示一次

其他邮箱的 SMTP 设置:

邮箱
SMTP服务器
端口
QQ邮箱
smtp.qq.com
465
163邮箱
smtp.163.com
465
Gmail
smtp.gmail.com
587
Outlook
smtp.office365.com
587

3.2 第二步:最简单的邮件代码

import smtplib
from email.mime.text import MIMEText
from email.header import Header
# 配置
SMTP_SERVER = "smtp.qq.com"
SMTP_PORT = 465
EMAIL_USER = "123456789@qq.com"  # 替换为你的邮箱
EMAIL_PASS = "abcdefghijklmnop"  # 替换为你的授权码
# 创建邮件
msg = MIMEText("这是一封测试邮件,来自 Python 自动化脚本。", "plain", "utf-8")
msg["From"] = f"自动化脚本<{EMAIL_USER}>"
msg["To"] = "收件人邮箱@example.com"
msg["Subject"] = Header("自动化测试邮件", "utf-8")
# 发送
with smtplib.SMTP_SSL(SMTP_SERVER, SMTP_PORT) as server:
server.login(EMAIL_USER, EMAIL_PASS)
server.sendmail(EMAIL_USER, ["收件人邮箱@example.com"], msg.as_string())
print("邮件发送成功!")

运行这段代码,收件人会收到一封纯文本邮件。


3.3 第三步:发送 HTML 格式邮件

纯文本太朴素,我们可以发送带格式的 HTML 邮件:

from email.mime.text import MIMEText
from email.header import Header
import smtplib
SMTP_SERVER = "smtp.qq.com"
SMTP_PORT = 465
EMAIL_USER = "your_qq@qq.com"
EMAIL_PASS = "your_auth_code"
# HTML 内容
html_content = """
<html>
<head><style>
body { font-family: 'Microsoft YaHei', sans-serif; line-height: 1.6; }
h2 { color: #1565C0; }
.highlight { background: #FFF3CD; padding: 2px 6px; border-radius: 4px; }
.footer { color: #666; font-size: 12px; margin-top: 20px; }
</style></head>
<body>
<h2>📊 日报数据已生成</h2>
<p>您好,<span class="highlight">今日的数据处理任务已完成</span>。</p>
<p><strong>处理时间:</strong>2026-04-10 14:30</p>
<p><strong>数据条数:</strong>1,247 条</p>
<p><strong>文件位置:</strong>/reports/daily_2026-04-10.xlsx</p>
<hr>
<p class="footer">此邮件由自动化脚本发送</p>
</body>
</html>
"""
msg = MIMEText(html_content, "html", "utf-8")
msg["From"] = f"数据机器人<{EMAIL_USER}>"
msg["To"] = "manager@company.com"
msg["Subject"] = Header("【日报】数据处理完成通知", "utf-8")
with smtplib.SMTP_SSL(SMTP_SERVER, SMTP_PORT) as server:
server.login(EMAIL_USER, EMAIL_PASS)
server.sendmail(EMAIL_USER, ["manager@company.com"], msg.as_string())
print("HTML 邮件发送成功!")

HTML 邮件的优势:

  • 彩色高亮重要信息
  • 表格展示数据
  • 按钮和链接
  • 更好的阅读体验

3.4 第四步:发送带附件的邮件

报表做完了,直接作为附件发出去:

from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from email.mime.base import MIMEBase
from email import encoders
from email.header import Header
import smtplib
import os
SMTP_SERVER = "smtp.qq.com"
SMTP_PORT = 465
EMAIL_USER = "your_qq@qq.com"
EMAIL_PASS = "your_auth_code"
def send_email_with_attachment(to_email, subject, body, attachment_path):
"""
发送带附件的邮件
"""
# 创建多部分邮件
msg = MIMEMultipart()
msg["From"] = f"报表系统<{EMAIL_USER}>"
msg["To"] = to_email
msg["Subject"] = Header(subject, "utf-8")
# 添加邮件正文
msg.attach(MIMEText(body, "plain", "utf-8"))
# 添加附件
if attachment_path and os.path.exists(attachment_path):
with open(attachment_path, "rb") as f:
attachment = MIMEBase("application", "octet-stream")
attachment.set_payload(f.read())
encoders.encode_base64(attachment)
filename = os.path.basename(attachment_path)
attachment.add_header(
"Content-Disposition",
f'attachment; filename="{filename}"'
)
msg.attach(attachment)
print(f"已添加附件:{filename}")
# 发送
with smtplib.SMTP_SSL(SMTP_SERVER, SMTP_PORT) as server:
server.login(EMAIL_USER, EMAIL_PASS)
server.sendmail(EMAIL_USER, [to_email], msg.as_string())
print(f"邮件已发送至:{to_email}")
# 使用示例
send_email_with_attachment(
to_email="team@company.com",
subject="【周报】销售数据报表",
body="各位好,\n\n本周销售数据报表已生成,请查收附件。\n\n自动化报表系统",
attachment_path="reports/sales_weekly_2026_04.xlsx"
)

3.5 第五步:批量发送邮件

给多个部门发同样的报告?用循环搞定:

def batch_send_emails(recipient_list, subject, body, attachment_path=None):
"""
批量发送邮件
recipient_list: [(姓名, 邮箱), ...]
"""
success_count = 0
fail_count = 0
for name, email in recipient_list:
try:
# 个性化正文(替换姓名)
personalized_body = body.replace("{{姓名}}", name)
if attachment_path:
send_email_with_attachment(email, subject, personalized_body, attachment_path)
else:
# 发送纯文本邮件
msg = MIMEText(personalized_body, "plain", "utf-8")
msg["From"] = f"通知系统<{EMAIL_USER}>"
msg["To"] = email
msg["Subject"] = Header(subject, "utf-8")
with smtplib.SMTP_SSL(SMTP_SERVER, SMTP_PORT) as server:
server.login(EMAIL_USER, EMAIL_PASS)
server.sendmail(EMAIL_USER, [email], msg.as_string())
print(f"✓ 发送成功:{name} ({email})")
success_count += 1
except Exception as e:
print(f"✗ 发送失败:{name} ({email}) - {str(e)}")
fail_count += 1
print(f"\n发送完成:成功 {success_count} 封,失败 {fail_count} 封")
return success_count, fail_count
# 收件人列表
recipients = [
("张经理", "zhang@company.com"),
("李主管", "li@company.com"),
("王总监", "wang@company.com"),
]
# 批量发送
batch_send_emails(
recipient_list=recipients,
subject="【重要】月度运营会议通知",
body="{{姓名}}您好,\n\n月度运营会议将于明天下午 2:00 举行,请准时参加。\n\n行政部",
)

四、实战:自动化脚本+邮件通知


场景一:数据处理完成通知

把邮件发送整合到你的自动化脚本中:

import pandas as pd
from datetime import datetime
def process_data_and_notify():
"""
处理数据并发送通知邮件
"""
print("开始处理数据...")
# 1. 读取数据
df = pd.read_excel("raw_data.xlsx")
total_rows = len(df)
# 2. 清洗处理
df = df.dropna()
df["日期"] = pd.to_datetime(df["日期"])
processed_rows = len(df)
# 3. 保存结果
output_file = f"cleaned_data_{datetime.now().strftime('%Y%m%d')}.xlsx"
df.to_excel(output_file, index=False)
# 4. 发送通知邮件
summary = f"""
数据处理任务完成报告
处理时间:{datetime.now().strftime('%Y-%m-%d %H:%M')}
原始数据:{total_rows} 条
处理后:{processed_rows} 条
异常数据:{total_rows - processed_rows} 条
输出文件:{output_file}
请查收附件中的处理结果。
"""
send_email_with_attachment(
to_email="manager@company.com",
subject=f"【数据处理】{datetime.now().strftime('%m月%d日')} 数据清洗完成",
body=summary,
attachment_path=output_file
)
print("处理完成并已发送通知邮件!")
# 运行
process_data_and_notify()

场景二:异常监控告警

监控脚本检测到问题,立刻发邮件告警:

import time
def monitor_and_alert():
"""
监控系统状态,异常时发送告警邮件
"""
max_retries = 3
for attempt in range(max_retries):
try:
# 模拟监控检查
check_system_status()
print(f"检查 #{attempt + 1}:系统正常")
time.sleep(60)  # 每分钟检查一次
except Exception as e:
error_msg = f"系统异常告警!\n\n时间:{datetime.now().strftime('%Y-%m-%d %H:%M:%S')}\n错误:{str(e)}\n重试次数:{attempt + 1}/{max_retries}"
print(f"⚠️ 检测到异常:{str(e)}")
# 发送告警邮件
msg = MIMEText(error_msg, "plain", "utf-8")
msg["From"] = f"监控系统<{EMAIL_USER}>"
msg["To"] = "ops@company.com"
msg["Subject"] = Header("【紧急】系统异常告警", "utf-8")
with smtplib.SMTP_SSL(SMTP_SERVER, SMTP_PORT) as server:
server.login(EMAIL_USER, EMAIL_PASS)
server.sendmail(EMAIL_USER, ["ops@company.com"], msg.as_string())
print("告警邮件已发送!")
if attempt < max_retries - 1:
time.sleep(5)  # 等待5秒后重试
else:
print("已达到最大重试次数,停止监控")
break
def check_system_status():
"""模拟系统检查"""
import random
if random.random() < 0.1:  # 10% 概率报错
raise Exception("数据库连接超时")
# 运行监控
monitor_and_alert()

场景三:定时任务+邮件提醒

结合 Windows 任务计划程序或 Linux cron,定时发送邮件:

def daily_report_scheduler():
"""
每日报告生成和发送
建议配合任务调度器定时运行
"""
today = datetime.now()
# 检查是否是工作日(跳过周末)
if today.weekday() >= 5:  # 5=周六, 6=周日
print("今天是周末,跳过日报发送")
return
print(f"生成 {today.strftime('%Y-%m-%d')} 日报...")
# 生成报告(这里用你的实际逻辑)
report_path = generate_daily_report(today)
# 发送邮件
send_email_with_attachment(
to_email="team@company.com",
subject=f"【日报】{today.strftime('%m月%d日')} 运营数据",
body=f"各位好,\n\n{today.strftime('%Y年%m月%d日')}日报已生成,请查收。\n\n此邮件由自动化脚本发送",
attachment_path=report_path
)
print("日报发送完成!")
def generate_daily_report(date):
"""生成日报(模拟)"""
# 这里替换为你的实际数据生成逻辑
report_file = f"daily_report_{date.strftime('%Y%m%d')}.xlsx"
# ... 生成报告的逻辑 ...
return report_file
# 运行
if __name__ == "__main__":
daily_report_scheduler()

Windows 定时任务设置

  1. 打开「任务计划程序」
  2. 创建基本任务 → 输入名称
  3. 触发器:每天
  4. 操作:启动程序
  5. 程序:python,参数:daily_report.py
  6. 完成设置

五、高级技巧


技巧一:使用模板引擎生成邮件

复杂邮件用 Jinja2 模板:

from jinja2 import Template
email_template = """
<h2>Hello {{ name }},</h2>
<p>Your daily report for <strong>{{ date }}</strong> is ready.</p>
<table border="1" cellpadding="5">
<tr><th>Metric</th><th>Value</th></tr>
<tr><td>Total Sales</td><td>${{ total_sales }}</td></tr>
<tr><td>New Orders</td><td>{{ new_orders }}</td></tr>
<tr><td>Conversion</td><td>{{ conversion }}%</td></tr>
</table>
<p>Please find the detailed report attached.</p>
"""
data = {
"name": "Manager",
"date": "2026-04-10",
"total_sales": 15230,
"new_orders": 47,
"conversion": 3.2
}
template = Template(email_template)
html_body = template.render(**data)
# 然后用 html_body 发送邮件

技巧二:邮件发送结果记录

记录发送历史,方便追踪:

import json
from datetime import datetime
def log_email_sent(to_email, subject, status, error=None):
"""
记录邮件发送日志
"""
log_entry = {
"timestamp": datetime.now().isoformat(),
"to": to_email,
"subject": subject,
"status": status,
"error": error
}
log_file = "email_log.json"
try:
with open(log_file, "r", encoding="utf-8") as f:
logs = json.load(f)
except FileNotFoundError:
logs = []
logs.append(log_entry)
with open(log_file, "w", encoding="utf-8") as f:
json.dump(logs, f, ensure_ascii=False, indent=2)
# 使用示例
log_email_sent("user@example.com", "测试邮件", "success")

六、Day4 小结


今天我们学了:

1. Python 发邮件基础

  • 配置 SMTP 服务器和授权码
  • 发送纯文本和 HTML 邮件
  • 发送带附件的邮件

2. 批量邮件发送

  • 循环发送给多个收件人
  • 个性化邮件内容
  • 发送结果统计

3. 实战场景

  • 数据处理完成通知
  • 异常监控告警
  • 定时任务+邮件提醒

4. 高级技巧

  • Jinja2 模板引擎
  • 邮件发送日志记录

七、今日作业


完成以下任务,巩固今天的内容:

  1. 基础练习
  • 配置你的邮箱 SMTP 服务
  • 给自己发送一封测试邮件(纯文本和 HTML 各一封)
  1. 实战任务
  • 写一个脚本,读取昨天的 Excel 数据清洗结果
  • 统计处理了多少行数据
  • 把结果通过邮件发送给你的邮箱
  1. 挑战任务
  • 给 3 个同事批量发送带附件的工作周报
  • 邮件正文包含个性化称呼("张经理好"、"李主管好"等)

八、预告


Day5:会议纪要智能整理 —— 自动录音转文字、提取待办、生成纪要。

我们会用到 AI 语音识别 + 自然语言处理,敬请期待!


💡 系列回顾

- Day1:Excel 批量清洗

- Day2:Word 批量排版

- Day3:PPT 自动生成

- Day4:邮件通知自动化 ✅

关注「量子位开发手记」,每天解锁一个办公自动化技能

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-07-04 08:11:50 HTTP/2.0 GET : https://f.mffb.com.cn/a/489030.html
  2. 运行时间 : 0.370349s [ 吞吐率:2.70req/s ] 内存消耗:4,905.48kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=5267d7b84319b11d90502645d2a1c9ac
  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.000559s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.000652s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.004386s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.012532s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000788s ]
  6. SELECT * FROM `set` [ RunTime:0.013961s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.000995s ]
  8. SELECT * FROM `article` WHERE `id` = 489030 LIMIT 1 [ RunTime:0.079876s ]
  9. UPDATE `article` SET `lasttime` = 1783123910 WHERE `id` = 489030 [ RunTime:0.077944s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 66 LIMIT 1 [ RunTime:0.000323s ]
  11. SELECT * FROM `article` WHERE `id` < 489030 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.008958s ]
  12. SELECT * FROM `article` WHERE `id` > 489030 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.005429s ]
  13. SELECT * FROM `article` WHERE `id` < 489030 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.034296s ]
  14. SELECT * FROM `article` WHERE `id` < 489030 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.028523s ]
  15. SELECT * FROM `article` WHERE `id` < 489030 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.031119s ]
0.371975s