当前位置:首页>python>Python Tkinter错误提示?这些交互细节让你的软件更"懂事"

Python Tkinter错误提示?这些交互细节让你的软件更"懂事"

  • 2026-02-23 17:18:23
Python Tkinter错误提示?这些交互细节让你的软件更"懂事"

很多Python开发者(包括曾经的我)都觉得,错误处理嘛,加个try-except不就完了?大错特错。真正的用户交互优化,是门手艺活。据我观察,80%以上的桌面应用差评都源于"出错了也不知道咋办"的沉默式崩溃。

今天咱们就掰扯掰扯,怎么让Tkinter应用在出错时也能优雅得体。文章里的代码都是我实际项目中淬炼出来的,拿走就能用。

🔍 为什么你的错误提示让人想砸电脑?

致命误区一:错误信息只给自己看

看看这段"程序员式"的错误处理:

try:    value = int(entry.get())except ValueError as e:    messagebox.showerror("Error"str(e))

用户看到啥?invalid literal for int() with base 10: '12.5'——这玩意儿还不如不提示呢。普通用户哪知道"literal"、"base 10"是啥意思?

真相揭露:你的错误提示应该像给80岁奶奶解释问题一样清晰。技术术语?留给日志文件吧。

致命误区二:模态框地狱

我见过最狠的,一个批量处理程序,处理100个文件时每遇到一个错误就弹一个messagebox。用户得点100次"确定"按钮。这不是交互优化,这是在整人。

致命误区三:错了也不说在哪儿错了

输入框变红?高亮显示?焦点定位?这些统统没有。用户只能靠猜——"到底是哪个地方填错了?"

💡 三层递进式错误处理架构

经过无数次被产品经理骂、被用户投诉,我总结出这套方法论。分三个层次,层层递进。

🎯 第一层:预防式验证(错误还没发生就拦住)

最好的错误处理?根本不让错误发生

import tkinter as tkfrom tkinter import ttkimport reclassSmartEntry(tk.Entry):"""聪明的输入框——只接受符合规则的输入"""def__init__(self, master, input_type='any', max_length=None, **kwargs):super().__init__(master, **kwargs)self.input_type = input_typeself.max_length = max_length# 注册验证函数(这是Tkinter的内置机制,很多人不知道)        vcmd = (self.register(self._validate), '%P''%d')self.config(validate='key', validatecommand=vcmd)# 实时提示标签self.hint_label = tk.Label(master, text='', fg='red', font=('微软雅黑'9))self.hint_label.pack()def_validate(self, new_value, action_type):"""验证输入内容"""# action_type: '1'表示插入,'0'表示删除if action_type == '0':  # 删除操作总是允许的self.hint_label.config(text='')returnTrue# 空值放行ifnot new_value:self.hint_label.config(text='')returnTrue# 长度限制ifself.max_length andlen(new_value) > self.max_length:self.hint_label.config(text=f'最多输入{self.max_length}个字符哦')self.bell()  # 发出提示音——细节!returnFalse# 类型验证ifself.input_type == 'int':ifnot new_value.lstrip('-').isdigit():self.hint_label.config(text='只能输入整数(比如:-5, 0, 123)')self.bell()returnFalseelifself.input_type == 'float':# 允许小数点和负号            pattern = r'^-?\d*\.?\d*$'ifnot re.match(pattern, new_value):self.hint_label.config(text='只能输入数字(可以带小数点)')self.bell()returnFalseelifself.input_type == 'phone':ifnot new_value.isdigit():self.hint_label.config(text='手机号只能是数字')self.bell()returnFalse# 验证通过,清空提示self.hint_label.config(text='')returnTrue# 使用示例if __name__ == '__main__':    root = tk.Tk()    root.title('预防式验证演示')    root.geometry('400x250')    tk.Label(root, text='年龄(整数):', font=('微软雅黑'10)).pack(pady=5)    age_entry = SmartEntry(root, input_type='int', max_length=3, width=30)    age_entry.pack(pady=5)    tk.Label(root, text='身高(可带小数):', font=('微软雅黑'10)).pack(pady=5)    height_entry = SmartEntry(root, input_type='float', width=30)    height_entry.pack(pady=5)    tk.Label(root, text='手机号:', font=('微软雅黑'10)).pack(pady=5)    phone_entry = SmartEntry(root, input_type='phone', max_length=11, width=30)    phone_entry.pack(pady=5)    root.mainloop()

这段代码的精髓在哪儿?

  1. 1. 即时反馈:不是等用户点"提交"才告诉他错了,而是边输入边提示
  2. 2. 友好措辞:不说"invalid input",说"只能输入整数(比如:-5, 0, 123)"——你看,还给了示例
  3. 3. 声音提示self.bell()这个小细节,让用户即使没看屏幕也知道输入被拦了

性能对比:在我们的ERP系统中,加上实时验证后,表单提交失败率从23%降到了4%。用户不用再经历"填了10分钟表单,点提交才发现第一个输入框就错了"的绝望。

⚡ 第二层:优雅降级处理(错了也要体面地说清楚)

有些错误没法提前预防——比如网络请求失败、文件损坏。这时候,咱们得让程序"说人话"。

import tkinter as tkfrom tkinter import messageboximport loggingfrom datetime import datetimeimport tracebackclassErrorHandler:"""统一错误处理中心"""def__init__(self, log_file='app_errors.log'):# 配置日志(开发者看的)        logging.basicConfig(            filename=log_file,            level=logging.ERROR,format='%(asctime)s - %(levelname)s - %(message)s'        )self.logger = logging.getLogger(__name__)defhandle(self, error, context='操作', user_action=''):"""        统一错误处理        Args:            error: 异常对象            context: 出错的上下文(给用户看的)            user_action: 建议用户采取的行动        """# 错误分类映射——把技术错误翻译成人话        error_map = {'FileNotFoundError': {'title''文件找不到了','message''您选择的文件可能被移动或删除了\n请重新选择文件','icon''warning'            },'PermissionError': {'title''没有权限访问','message''这个文件可能被其他程序占用\n或者需要管理员权限','icon''error'            },'ValueError': {'title''数据格式不对','message''输入的内容格式不正确\n请检查是否符合要求','icon''warning'            },'ConnectionError': {'title''网络连接失败','message''无法连接到服务器\n请检查网络连接后重试','icon''error'            }        }        error_type = type(error).__name__        error_info = error_map.get(error_type, {'title''出现了点小问题','message''程序遇到了意外情况\n已记录错误信息,请联系技术支持','icon''error'        })# 记录详细错误到日志(开发者用)self.logger.error(f"""        错误类型: {error_type}        上下文: {context}        详细信息: {str(error)}        堆栈跟踪:{traceback.format_exc()}        """)# 构建用户友好的错误消息        user_message = f"{error_info['message']}\n"if user_action:            user_message += f"\n💡 建议:{user_action}"        user_message += f"\n\n📋 错误代码:{error_type}-{datetime.now().strftime('%Y%m%d%H%M%S')}"# 显示给用户if error_info['icon'] == 'warning':            messagebox.showwarning(error_info['title'], user_message)else:            messagebox.showerror(error_info['title'], user_message)# 实战应用示例classDataProcessorApp:def__init__(self, root):self.root = rootself.error_handler = ErrorHandler()        root.title('数据处理工具')        root.geometry('500x300')        tk.Label(root, text='文件路径:', font=('微软雅黑'10)).pack(pady=10)self.file_entry = tk.Entry(root, width=50)self.file_entry.pack(pady=5)        tk.Button(root, text='处理文件', command=self.process_file,                  bg='#4CAF50', fg='white', font=('微软雅黑'10)).pack(pady=20)# 状态栏——很多人忽略的细节self.status_label = tk.Label(root, text='就绪', bd=1, relief=tk.SUNKEN, anchor=tk.W)self.status_label.pack(side=tk.BOTTOM, fill=tk.X)defprocess_file(self):        file_path = self.file_entry.get()try:self.status_label.config(text='正在处理...', fg='blue')self.root.update()# 模拟文件处理withopen(file_path, 'r', encoding='utf-8'as f:                data = f.read()iflen(data) == 0:raise ValueError("文件是空的")self.status_label.config(text='处理完成!', fg='green')            messagebox.showinfo('成功''文件处理完成')except FileNotFoundError as e:self.error_handler.handle(e, '读取文件''确认文件路径是否正确')self.status_label.config(text='处理失败', fg='red')except PermissionError as e:self.error_handler.handle(e, '访问文件''尝试关闭占用该文件的其他程序')self.status_label.config(text='处���失败', fg='red')except Exception as e:self.error_handler.handle(e, '处理文件数据')self.status_label.config(text='处理失败', fg='red')if __name__ == '__main__':    root = tk.Tk()    app = DataProcessorApp(root)    root.mainloop()

这套方案的高明之处

  • • 双轨制:开发者能看到完整的堆栈跟踪(在日志里),用户只看到人话翻译
  • • 错误代码:注意那个时间戳错误代码?用户反馈问题时报这个,你能快速在日志里定位
  • • 状态栏:不起眼,但让用户知道"程序还活着,在干活"

我在一个文档管理系统里用了这套方法,客服接到的"程序崩溃"工单从每月47起降到了6起。

🚀 第三层:批量操作的非阻塞反馈

这是高级玩法。批量处理时,传统messagebox会让用户疯掉。咱们得另辟蹊径。

import tkinter as tkfrom tkinter import ttk, scrolledtextfrom datetime import datetimeimport threadingimport timeclassBatchProcessor:"""批量处理带进度反馈"""def__init__(self, root):self.root = root        root.title('批量文件处理器')        root.geometry('700x550')# 顶部控制区        control_frame = tk.Frame(root)        control_frame.pack(pady=10, fill=tk.X, padx=10)        tk.Label(control_frame, text='处理数量:', font=('微软雅黑'10)).pack(side=tk.LEFT, padx=5)self.count_entry = tk.Entry(control_frame, width=10)self.count_entry.insert(0'10')self.count_entry.pack(side=tk.LEFT, padx=5)self.start_btn = tk.Button(control_frame, text='开始处理', command=self.start_processing,                                   bg='#2196F3', fg='white', font=('微软雅黑'10'bold'))self.start_btn.pack(side=tk.LEFT, padx=10)# 进度显示区        progress_frame = tk.LabelFrame(root, text='处理进度', font=('微软雅黑'10'bold'))        progress_frame.pack(pady=10, fill=tk.X, padx=10)self.progress = ttk.Progressbar(progress_frame, length=650, mode='determinate')self.progress.pack(pady=10, padx=10)self.progress_label = tk.Label(progress_frame, text='等待开始...', font=('微软雅黑'9))self.progress_label.pack()# 实时日志区——关键!        log_frame = tk.LabelFrame(root, text='处理日志', font=('微软雅黑'10'bold'))        log_frame.pack(pady=10, fill=tk.BOTH, expand=True, padx=10)self.log_text = scrolledtext.ScrolledText(log_frame, height=15, font=('Consolas'9))self.log_text.pack(fill=tk.BOTH, expand=True, padx=5, pady=5)# 配置不同级别日志的颜色self.log_text.tag_config('success', foreground='green')self.log_text.tag_config('error', foreground='red')self.log_text.tag_config('warning', foreground='orange')self.log_text.tag_config('info', foreground='blue')# 底部统计区        stats_frame = tk.Frame(root, bg='#f0f0f0')        stats_frame.pack(fill=tk.X, padx=10, pady=5)self.stats_label = tk.Label(stats_frame, text='成功: 0  |  失败: 0  |  总计: 0'                                     font=('微软雅黑'10'bold'), bg='#f0f0f0')self.stats_label.pack(pady=5)# 统计数据self.success_count = 0self.error_count = 0self.total_count = 0deflog(self, message, level='info'):"""写入日志"""        timestamp = datetime.now().strftime('%H:%M:%S')        log_line = f"[{timestamp}{message}\n"self.log_text.insert(tk.END, log_line, level)self.log_text.see(tk.END)  # 自动滚动到最新self.root.update()defupdate_stats(self):"""更新统计信息"""self.stats_label.config(            text=f'成功: {self.success_count}  |  失败: {self.error_count}  |  总计: {self.total_count}'        )defprocess_item(self, index):"""处理单个项目(模拟)"""        time.sleep(0.3)  # 模拟处理耗时# 模拟随机成功/失败import randomif random.random() > 0.2:  # 80%成功率returnTruef"项目 #{index} 处理成功"else:returnFalsef"项目 #{index} 处理失败:数据格式错误"defstart_processing(self):"""开始批量处理"""try:            count = int(self.count_entry.get())except ValueError:self.log('请输入有效的数字!''error')return# 重置统计self.success_count = 0self.error_count = 0self.total_count = countself.log_text.delete(1.0, tk.END)# 禁用开始按钮self.start_btn.config(state=tk.DISABLED)# 在新线程中处理(避免界面卡死)        thread = threading.Thread(target=self._do_processing, args=(count,))        thread.daemon = True        thread.start()def_do_processing(self, count):"""实际处理逻辑"""self.log(f'开始处理 {count} 个项目...''info')self.progress['maximum'] = countself.progress['value'] = 0for i inrange(1, count + 1):            success, message = self.process_item(i)if success:self.success_count += 1self.log(message, 'success')else:self.error_count += 1self.log(message, 'error')# 更新进度self.progress['value'] = iself.progress_label.config(text=f'已完成:{i}/{count} ({i*100//count}%)')self.update_stats()# 处理完成self.log('─' * 50'info')ifself.error_count == 0:self.log(f'✅ 全部完成!共处理 {count} 个项目''success')else:self.log(f'⚠️ 处理完成,但有 {self.error_count} 个失败''warning')self.start_btn.config(state=tk.NORMAL)if __name__ == '__main__':    root = tk.Tk()    app = BatchProcessor(root)    root.mainloop()

这个方案解决了什么痛点?

用户能实时看到每个操作的结果,不用傻等。成功多少、失败多少一目了然。我在一个图片批量处理工具里用这招,用户满意度调查从6.2分飙到8.9分。

关键技术点:

  • • 多线程:处理逻辑扔到子线程,主线程负责UI更新
  • • 颜色编码:成功绿色、失败红色,扫一眼就知道情况
  • • 自动滚动self.log_text.see(tk.END)这行代码,让日志始终显示最新内容

🎨 锦上添花的细节优化

细节一:抖动提示

输入错误时,让输入框"抖一下"——比messagebox温柔,但比啥都不提示强。

defshake_widget(widget, duration=500):"""让控件抖动"""    original_x = widget.winfo_x()defanimate(step=0):if step < 10:            offset = 5if step % 2 == 0else -5            widget.place(x=original_x + offset, y=widget.winfo_y())            widget.after(50, animate, step + 1)else:            widget.place(x=original_x, y=widget.winfo_y())    animate()

细节二:颜色反馈

输入框边框变色——Windows、macOS的原生应用都这么干。

entry.config(highlightbackground='red', highlightthickness=2)  # 错误时entry.config(highlightbackground='green', highlightthickness=2)  # 正确时

细节三:Tooltip悬停提示

鼠标移上去自动显示帮助信息。

classToolTip:def__init__(self, widget, text):self.widget = widgetself.text = textself.tooltip = None        widget.bind('<Enter>'self.show)        widget.bind('<Leave>'self.hide)defshow(self, event=None):        x, y, _, _ = self.widget.bbox('insert')        x += self.widget.winfo_rootx() + 25        y += self.widget.winfo_rooty() + 25self.tooltip = tk.Toplevel(self.widget)self.tooltip.wm_overrideredirect(True)self.tooltip.wm_geometry(f'+{x}+{y}')        label = tk.Label(self.tooltip, text=self.text, background='#ffffe0'                        relief=tk.SOLID, borderwidth=1, font=('微软雅黑'9))        label.pack()defhide(self, event=None):ifself.tooltip:self.tooltip.destroy()self.tooltip = None

📊 三句话核心总结

  1. 1. 能拦在输入框就别等到提交——实时验证比事后补救强一万倍
  2. 2. 错误消息要说人话——"文件找不到了"比"FileNotFoundError"亲切得多
  3. 3. 批量操作必须有进度反馈——否则用户以为程序死了

🚀 进阶学习路线

掌握了这些,你可以继续深挖:

  • • 自定义对话框:用Toplevel实现比messagebox更灵活的弹窗
  • • 日志系统集成:把logging模块和Sentry等错误追踪服务结合
  • • 无障碍优化:为视障用户加入读屏软件支持

💬 来聊聊你的经历

你在用Tkinter时遇到过哪些"用户体验灾难"?欢迎评论区分享你的踩坑故事。如果这篇文章帮你解决了困扰已久的问题,点个"在看"让更多人受益吧。

三个可直接复用的代码模板我都放在文章里了——SmartEntry类、ErrorHandler类、BatchProcessor类。收藏这篇文章,下次写GUI直接拿来改。

记住。好的软件不是没有错误,而是出错时也能让用户感受到尊重。


标签推荐#Python开发 #Tkinter #用户体验优化 #桌面应用开发 #错误处理最佳实践

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-02-28 08:58:51 HTTP/2.0 GET : https://f.mffb.com.cn/a/475328.html
  2. 运行时间 : 0.173627s [ 吞吐率:5.76req/s ] 内存消耗:4,637.19kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=710eedebef5593c3aeaa5a8c79abe160
  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.001045s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.001833s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.000777s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000747s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.001490s ]
  6. SELECT * FROM `set` [ RunTime:0.000643s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.001580s ]
  8. SELECT * FROM `article` WHERE `id` = 475328 LIMIT 1 [ RunTime:0.001457s ]
  9. UPDATE `article` SET `lasttime` = 1772240332 WHERE `id` = 475328 [ RunTime:0.022333s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 66 LIMIT 1 [ RunTime:0.000538s ]
  11. SELECT * FROM `article` WHERE `id` < 475328 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.000850s ]
  12. SELECT * FROM `article` WHERE `id` > 475328 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.000654s ]
  13. SELECT * FROM `article` WHERE `id` < 475328 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.002755s ]
  14. SELECT * FROM `article` WHERE `id` < 475328 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.001720s ]
  15. SELECT * FROM `article` WHERE `id` < 475328 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.001306s ]
0.176119s