当前位置:首页>python>第147讲:创建专业参数输入表单:Python的tkinter/xlwings与Excel VBA实战详解

第147讲:创建专业参数输入表单:Python的tkinter/xlwings与Excel VBA实战详解

  • 2026-01-31 21:14:50
第147讲:创建专业参数输入表单:Python的tkinter/xlwings与Excel VBA实战详解

如何在Excel中创建既美观又实用的参数输入表单?本文将深入探讨Python和VBA两种技术方案,帮助您根据项目需求选择最佳解决方案

在数据处理和分析工作中,参数输入表单用户与程序交互的重要桥梁。一个设计良好的表单不仅能提升用户体验,还能有效减少输入错误提高数据质量。无论是财务建模科学计算还是业务分析参数输入表单都发挥着至关重要的作用。

一、业务背景与参数输入表单的价值

在日常工作中,数据输入是不可避免的环节。传统直接在Excel单元格中输入参数的方式存在诸多问题:缺乏验证机制容易导致数据错误,界面不友好影响用户体验,格式不统一增加处理难度。

据统计,使用专业输入表单可以将数据错误率降低60%以上,同时提高数据录入效率约40%。优质的参数输入表单还能降低培训成本提升工作标准化程度

二、Python方案:tkinter与xlwings高级应用

Python凭借丰富的GUI库强大的数据处理能力,为Excel参数输入表单提供了灵活而先进的解决方案

2.1 环境配置与基础表单创建

安装必要库

pip install tkinter xlwings pandas numpy

基础tkinter表单实现

import tkinter as tkfrom tkinter import ttkimport xlwings as xwimport pandas as pdclass ParameterForm:    """参数输入表单基类"""    def __init__(self, title="参数输入表单"):        self.root = tk.Tk()        self.root.title(title)        self.root.geometry("400x300")        self.setup_ui()        self.parameters = {}    def setup_ui(self):        """设置用户界面"""        # 创建主框架        main_frame = ttk.Frame(self.root, padding="10")        main_frame.grid(row=0, column=0, sticky=(tk.W, tk.E, tk.N, tk.S))        # 配置网格权重        self.root.columnconfigure(0, weight=1)        self.root.rowconfigure(0, weight=1)        main_frame.columnconfigure(1, weight=1)        return main_frame    def create_input_field(self, parent, label_text, row, default_value=""                          input_type="text", required=False):        """创建输入字段"""        # 标签        label = ttk.Label(parent, text=label_text)        label.grid(row=row, column=0, sticky=tk.W, pady=5)        # 输入框        if input_type == "text":            entry = ttk.Entry(parent, width=30)            if default_value:                entry.insert(0, default_value)        elif input_type == "number":            entry = ttk.Entry(parent, width=30)            if default_value:                entry.insert(0str(default_value))        entry.grid(row=row, column=1, sticky=(tk.W, tk.E), pady=5)        # 必填标记        if required:            required_label = ttk.Label(parent, text="*", foreground="red")            required_label.grid(row=row, column=2, sticky=tk.W)        return entry# 使用示例def basic_form_demo():    """基础表单演示"""    form = ParameterForm("基础参数输入")    main_frame = form.setup_ui()    # 创建输入字段    name_entry = form.create_input_field(main_frame, "项目名称:"0"新项目""text"True)    value_entry = form.create_input_field(main_frame, "初始值:"1100"number"True)    form.root.mainloop()if __name__ == "__main__":    basic_form_demo()

2.2 高级表单功能与数据验证

增强的表单验证与数据处理

class AdvancedParameterForm(ParameterForm):    """高级参数输入表单"""    def __init__(self, excel_file=None, sheet_name=None):        super().__init__("高级参数输入表单")        self.excel_file = excel_file        self.sheet_name = sheet_name        self.validation_rules = {}        self.setup_advanced_features()    def setup_advanced_features(self):        """设置高级功能"""        self.setup_validation_rules()        self.setup_data_binding()    def setup_validation_rules(self):        """设置验证规则"""        self.validation_rules = {            'required'lambda x: len(x.strip()) > 0,            'number'lambda x: x.replace('.'''1).isdigit(),            'email'lambda x: '@' in x and '.' in x,            'percentage'lambda x: 0 <= float(x) <= 100        }    def create_advanced_input_field(self, parent, field_config, row):        """创建高级输入字段"""        label_text = field_config['label']        field_type = field_config.get('type''text')        default_value = field_config.get('default''')        required = field_config.get('required'False)        validation = field_config.get('validation'None)        # 创建基础字段        entry = self.create_input_field(parent, label_text, row, default_value, field_type, required)        # 添加验证        if validation:            self.add_validation(entry, validation, field_config['label'])        return entry    def add_validation(self, entry, validation_type, field_name):        """添加字段验证"""        if validation_type in self.validation_rules:            validate_cmd = (self.root.register(                lambda x: self.validate_input(x, validation_type, field_name)), '%P')            entry.configure(validate="key", validatecommand=validate_cmd)# 使用示例def advanced_form_demo():    """高级表单演示"""    form = AdvancedParameterForm("data.xlsx""Parameters")    main_frame = form.setup_ui()    # 字段配置    fields_config = [        {'label''项目名称''type''text''required'True'validation''required'},        {'label''投资金额''type''number''required'True'validation''number'},        {'label''预期收益率%''type''number''required'True'validation''percentage'}    ]    entries = {}    for i, config in enumerate(fields_config):        entries[config['label']] = form.create_advanced_input_field(main_frame, config, i)    # 添加按钮    submit_btn = ttk.Button(main_frame, text="提交到Excel"                           command=lambda: form.submit_to_excel(entries))    submit_btn.grid(row=len(fields_config), column=0, columnspan=2, pady=10)    form.root.mainloop()

2.3 与Excel的深度集成

通过xlwings实现与Excel的无缝集成

class ExcelIntegratedForm(AdvancedParameterForm):    """Excel集成表单"""    def __init__(self, excel_file, sheet_name="参数"):        super().__init__(excel_file, sheet_name)        self.wb = None        self.sheet = None        self.connect_to_excel()    def connect_to_excel(self):        """连接到Excel"""        try:            self.wb = xw.Book(self.excel_file)            self.sheet = self.wb.sheets[self.sheet_name]            print("成功连接到Excel文件")        except Exception as e:            print(f"连接Excel失败: {str(e)}")            # 创建新工作簿            self.wb = xw.Book()            self.sheet = self.wb.sheets[0]            self.sheet.name = "参数"    def submit_to_excel(self, entries):        """提交数据到Excel"""        try:            # 收集数据            data = {}            for label, entry in entries.items():                data[label] = entry.get()            # 验证数据            if not self.validate_all_fields(data):                return False            # 写入Excel            self.write_data_to_excel(data)            # 保存工作簿            self.wb.save(self.excel_file)            print("数据已成功写入Excel")            return True        except Exception as e:            print(f"提交数据失败: {str(e)}")            return False    def write_data_to_excel(self, data):        """写入数据到Excel"""        # 清空现有数据(保留标题)        if self.sheet.range('A1').value is None:            # 写入标题            headers = list(data.keys())            for i, header in enumerate(headers):                self.sheet.range(1, i+1).value = header        # 查找下一空行        next_row = self.find_next_empty_row()        # 写入数据        for i, (key, value) in enumerate(data.items()):            self.sheet.range(next_row, i+1).value = value# 使用示例def excel_integration_demo():    """Excel集成演示"""    form = ExcelIntegratedForm("financial_model.xlsx""输入参数")    # 配置财务模型参数字段    financial_fields = [        {'label''项目名称''type''text''required'True},        {'label''初始投资''type''number''required'True},        {'label''折现率%''type''number''required'True},        {'label''增长率%''type''number''required'True},        {'label''预测年数''type''number''required'True}    ]    # 创建表单界面    main_frame = form.setup_ui()    entries = {}    for i, config in enumerate(financial_fields):        entries[config['label']] = form.create_advanced_input_field(main_frame, config, i)    # 添加功能按钮    button_frame = ttk.Frame(main_frame)    button_frame.grid(row=len(financial_fields)+1, column=0, columnspan=2, pady=10)    submit_btn = ttk.Button(button_frame, text="提交参数"                           command=lambda: form.submit_to_excel(entries))    submit_btn.pack(side=tk.LEFT, padx=5)    load_btn = ttk.Button(button_frame, text="加载参数"                         command=lambda: form.load_from_excel(entries))    load_btn.pack(side=tk.LEFT, padx=5)    form.root.mainloop()

三、Excel VBA方案:UserForm专业开发

对于深度集成Excel环境的用户,VBA的UserForm提供了原生且高效的解决方案

3.1 基础UserForm创建

VBA用户窗体基础实现

' VBA用户窗体代码模块' 基础参数输入窗体Option ExplicitPublic InputParameters As Collection' 初始化窗体Private Sub UserForm_Initialize()    Set InputParameters = New Collection    SetupFormControls    LoadDefaultValuesEnd Sub' 设置窗体控件Private Sub SetupFormControls()    ' 设置标题    Me.Caption = "参数输入表单"    ' 创建标签和输入框    Dim currentTop As Integer    currentTop = 10    ' 项目名称字段    CreateFormField "项目名称:", "txtProjectName", currentTop, True    currentTop = currentTop + 25    ' 投资金额字段    CreateFormField "投资金额:", "txtInvestment", currentTop, True    currentTop = currentTop + 25    ' 收益率字段    CreateFormField "预期收益率%:", "txtReturnRate", currentTop, True    currentTop = currentTop + 25    ' 添加按钮    AddFormButtons currentTopEnd Sub' 创建表单字段Private Sub CreateFormField(labelText As String, controlName As String, _                          topPosition As Integer, isRequired As Boolean)    ' 创建标签    Dim lbl As MSForms.Label    Set lbl = Me.Controls.Add("Forms.Label.1", labelText & "Label")    With lbl        .Caption = labelText        .Left = 10        .Top = topPosition        .Width = 80        .Height = 15        If isRequired Then            .ForeColor = RGB(25500)  ' 红色表示必填        End If    End With    ' 创建文本框    Dim txt As MSForms.TextBox    Set txt = Me.Controls.Add("Forms.TextBox.1", controlName)    With txt        .Left = 95        .Top = topPosition        .Width = 120        .Height = 20    End WithEnd Sub' 添加表单按钮Private Sub AddFormButtons(topPosition As Integer)    ' 确定按钮    Dim btnOk As MSForms.CommandButton    Set btnOk = Me.Controls.Add("Forms.CommandButton.1", "btnOk")    With btnOk        .Caption = "确定"        .Left = 50        .Top = topPosition + 10        .Width = 60        .Height = 25    End With    ' 取消按钮    Dim btnCancel As MSForms.CommandButton    Set btnCancel = Me.Controls.Add("Forms.CommandButton.1", "btnCancel")    With btnCancel        .Caption = "取消"        .Left = 130        .Top = topPosition + 10        .Width = 60        .Height = 25    End WithEnd Sub

3.2 高级UserForm功能

增强的VBA用户窗体

' 高级UserForm功能Private Sub btnOk_Click()    ' 验证输入    If Not ValidateInputs Then        Exit Sub    End If    ' 收集数据    CollectParameters    ' 写入Excel    WriteToExcel    ' 关闭窗体    Unload MeEnd Sub' 输入验证Private Function ValidateInputs() As Boolean    ValidateInputs = False    ' 检查必填字段    If Len(Me.txtProjectName.Text) = 0 Then        MsgBox "请输入项目名称", vbExclamation        Me.txtProjectName.SetFocus        Exit Function    End If    ' 检查数值格式    If Not IsNumeric(Me.txtInvestment.Text) Then        MsgBox "投资金额必须是数字", vbExclamation        Me.txtInvestment.SetFocus        Exit Function    End If    ' 检查百分比范围    If IsNumeric(Me.txtReturnRate.Text) Then        Dim rate As Double        rate = CDbl(Me.txtReturnRate.Text)        If rate < 0 Or rate > 100 Then            MsgBox "收益率必须在0-100%之间", vbExclamation            Me.txtReturnRate.SetFocus            Exit Function        End If    End If    ValidateInputs = TrueEnd Function' 收集参数Private Sub CollectParameters()    Set InputParameters = New Collection    InputParameters.Add Me.txtProjectName.Text, "ProjectName"    InputParameters.Add CDbl(Me.txtInvestment.Text), "Investment"    InputParameters.Add CDbl(Me.txtReturnRate.Text), "ReturnRate"End Sub' 写入ExcelPrivate Sub WriteToExcel()    On Error GoTo ErrorHandler    Dim ws As Worksheet    Set ws = ThisWorkbook.Sheets("参数输入")    ' 查找下一空行    Dim nextRow As Long    nextRow = FindNextEmptyRow(ws)    ' 写入数据    With ws        .Cells(nextRow, 1).Value = InputParameters("ProjectName")        .Cells(nextRow, 2).Value = InputParameters("Investment")        .Cells(nextRow, 3).Value = InputParameters("ReturnRate")        .Cells(nextRow, 4).Value = Now()  ' 时间戳    End With    MsgBox "参数已成功保存到Excel", vbInformation    Exit SubErrorHandler:    MsgBox "写入Excel时出错: " & Err.Description, vbCriticalEnd Sub

四、方案对比与适用场景分析

4.1 技术特性全面对比

对比维度

Python方案

Excel VBA方案

优势分析

界面美观度

⭐⭐⭐⭐(可高度定制)

⭐⭐(标准控件)

Python界面设计更灵活

功能复杂度

⭐⭐⭐⭐(支持高级功能)

⭐⭐⭐(基础功能)

Python适合复杂业务逻辑

开发效率

⭐⭐(需要编码)

⭐⭐⭐⭐(可视化设计)

VBA开发速度更快

集成深度

⭐⭐⭐(外部调用)

⭐⭐⭐⭐⭐(原生集成)

VBA与Excel无缝集成

学习曲线

⭐⭐(需要Python基础)

⭐⭐⭐(Excel用户友好)

VBA更容易上手

维护成本

⭐⭐⭐(代码维护)

⭐⭐(界面维护)

VBA更易维护

4.2 实际应用场景选择指南

选择Python方案当

  • 复杂业务逻辑:需要复杂计算数据处理

  • 跨平台需求:需要在不同系统上运行

  • 界面要求高:需要高度定制的用户界面

  • 已有Python生态:团队熟悉Python有现有代码库

  • 性能要求高:处理大量数据复杂计算

选择Excel VBA当

  • 快速原型开发:需要快速实现基本功能

  • Excel深度集成重度依赖Excel功能

  • 非技术用户:主要用户熟悉Excel但不熟悉编程

  • 简单数据处理业务逻辑相对简单

  • 维护成本考虑:希望降低长期维护成本

五、实战案例:财务模型参数输入系统

5.1 业务背景与挑战

某投资公司需要为不同项目建立财务模型,传统参数输入方式面临挑战:

  • 参数分散不同项目的参数存储在多个Excel文件

  • 验证困难缺乏统一验证机制,数据错误率高

  • 版本混乱多版本参数难以管理,影响决策质量

  • 协作困难团队协作时参数标准不统一

5.2 基于Python的完整解决方案

财务模型参数输入系统

class FinancialModelForm(ExcelIntegratedForm):    """财务模型参数输入系统"""    def __init__(self, model_type="DCF"):        super().__init__("financial_models.xlsx""ModelParameters")        self.model_type = model_type        self.setup_financial_fields()    def setup_financial_fields(self):        """设置财务特定字段"""        self.financial_validations = {            'positive_number'lambda x: float(x) > 0,            'percentage'lambda x: 0 <= float(x) <= 100,            'year'lambda x: 1 <= float(x) <= 50        }    def create_dcf_parameters_form(self):        """创建DCF模型参数表单"""        dcf_fields = [            {'label''项目名称''type''text''required'True'validation''required'},            {'label''初始投资''type''number''required'True'validation''positive_number'},            {'label''收入增长率%''type''number''required'True'validation''percentage'},            {'label''EBITDA利润率%''type''number''required'True'validation''percentage'},            {'label''折现率%''type''number''required'True'validation''percentage'},            {'label''预测期''type''number''required'True'validation''year'}        ]        return self.create_form_from_config(dcf_fields)    def create_form_from_config(self, fields_config):        """根据配置创建表单"""        main_frame = self.setup_ui()        entries = {}        for i, config in enumerate(fields_config):            entries[config['label']] = self.create_advanced_input_field(main_frame, config, i)        # 添加模型特定按钮        self.add_financial_buttons(main_frame, entries, len(fields_config))        return entries    def add_financial_buttons(self, parent, entries, start_row):        """添加财务专用按钮"""        button_frame = ttk.Frame(parent)        button_frame.grid(row=start_row+1, column=0, columnspan=2, pady=10)        # 提交按钮        submit_btn = ttk.Button(button_frame, text="保存参数"                               command=lambdaself.save_financial_parameters(entries))        submit_btn.pack(side=tk.LEFT, padx=5)        # 计算按钮        calc_btn = ttk.Button(button_frame, text="计算模型"                             command=lambdaself.calculate_model(entries))        calc_btn.pack(side=tk.LEFT, padx=5)        # 验证按钮        validate_btn = ttk.Button(button_frame, text="验证参数"                                 command=lambdaself.validate_parameters(entries))        validate_btn.pack(side=tk.LEFT, padx=5)# 使用示例def financial_system_demo():    """财务系统演示"""    # 创建DCF模型参数表单    dcf_form = FinancialModelForm("DCF")    entries = dcf_form.create_dcf_parameters_form()    # 启动应用    dcf_form.root.mainloop()if __name__ == "__main__":    financial_system_demo()

测试题

  1. 在Python的tkinter表单中,如何实现实时数据验证?请举例说明如何在用户输入时检查数值范围并提供即时反馈。

  2. VBA的UserForm在处理复杂数据验证时有哪些局限性?与Python方案相比,在错误处理机制上有何本质区别?

  3. 当需要将参数输入表单部署给多个用户使用时,Python方案和VBA方案在部署便利性和版本控制方面各有什么优势与挑战?

  4. 在实现与Excel的深度集成时,为什么VBA的UserForm在响应速度和稳定性方面通常优于Python的xlwings方案?请从技术架构角度分析。

  5. 请设计一个混合架构方案,利用VBA UserForm收集简单参数,通过Python处理复杂计算,并说明这种架构如何实现性能与功能的平衡。


答案

  1. tkinter实时验证实现:使用validatecommandvalidate选项配置实时验证。通过entry.configure(validate="key", validatecommand=validate_cmd)实现按键级验证,结合正则表达式或自定义函数检查输入合法性。

  2. VBA验证局限性:VBA缺乏内置的实时验证机制,主要依赖提交时验证。错误处理通常使用On Error GoTo语句,而Python可使用try-except块提供更精细的异常处理。

  3. 部署与版本控制:Python方案可通过打包工具生成独立可执行文件,支持Git版本控制;VBA方案部署简便但版本管理困难,需要手动更新加载项。

  4. 集成性能差异:VBA作为Excel原生组件,享有进程内通信优势;Python通过COM接口与Excel交互,存在进程间通信开销。VBA直接操作Excel对象模型,响应更及时。

  5. 混合架构设计:VBA负责界面展示和简单验证,Python作为计算引擎处理复杂算法。通过文件或内存共享实现数据交换,既保持界面响应性,又获得强大计算能力。


希望这篇详细的参数输入表单开发指南能帮助您根据项目需求选择合适的技术方案!

如果觉得本文有帮助,请点赞、收藏、转发支持一下!

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-02-08 17:58:08 HTTP/2.0 GET : https://f.mffb.com.cn/a/464461.html
  2. 运行时间 : 0.479781s [ 吞吐率:2.08req/s ] 内存消耗:5,336.35kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=531812b621b64fa6c0f6f5b4cc7b334f
  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.001012s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.001399s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.001697s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.008559s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.001413s ]
  6. SELECT * FROM `set` [ RunTime:0.001574s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.001519s ]
  8. SELECT * FROM `article` WHERE `id` = 464461 LIMIT 1 [ RunTime:0.012712s ]
  9. UPDATE `article` SET `lasttime` = 1770544688 WHERE `id` = 464461 [ RunTime:0.011900s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 66 LIMIT 1 [ RunTime:0.004199s ]
  11. SELECT * FROM `article` WHERE `id` < 464461 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.003185s ]
  12. SELECT * FROM `article` WHERE `id` > 464461 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.002598s ]
  13. SELECT * FROM `article` WHERE `id` < 464461 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.053596s ]
  14. SELECT * FROM `article` WHERE `id` < 464461 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.187998s ]
  15. SELECT * FROM `article` WHERE `id` < 464461 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.022444s ]
0.483667s