当前位置:首页>python>python工具代码:导出VBA代码为MarkDown文件

python工具代码:导出VBA代码为MarkDown文件

  • 2026-06-29 20:46:48
python工具代码:导出VBA代码为MarkDown文件
大家好,我是冷水泡茶。下面是VBA代码导出工具的完整的python代码:
"""VBA 导出工具依赖:pip install oletools"""import osimport reimport threadingimport tkinter as tkfrom collections import Counterfrom tkinter import ttk, filedialog, messageboxfrom datetime import datetimetry:    from oletools.olevba import VBA_Parserexcept ImportError:    VBA_Parser = None# ────────────────────────────────#  模块类型识别(基于名称启发式判断)# ────────────────────────────────# 用户窗体名称前缀/全名的白名单,避免 "frm" 误匹配 "framework" 等_FORM_PREFIXES = re.compile(r'^(frm|userform)', re.IGNORECASE)def _guess_module_type(vba_filename: str, stream_path: str) -> tuple[intstr]:    """    返回 (type_id, type_label)    type_id: 1=标准模块, 2=类模块, 3=用户窗体, 100=文档模块    """    name_lower = vba_filename.lower()    stream_lower = stream_path.lower()    if name_lower == "thisworkbook":        return 100"文档模块 · ThisWorkbook"    if name_lower.startswith("sheet"):        return 100"文档模块 · 工作表"    # FIX: use prefix/regex check instead of "frm" in name to avoid false positives    if _FORM_PREFIXES.match(vba_filename) or "/3/" in stream_lower:        return 3"用户窗体 · UserForm"    if "class" in name_lower or name_lower.endswith("cls"or "/2/" in stream_lower:        return 2"类模块 · Class Module"    return 1"标准模块 · Module"# ─────────────────────────────────────────────#  VBA 提取# ─────────────────────────────────────────────def extract_vba_modules(excel_path: str) -> tuple[list[dict], str | None]:    """提取所有 VBA 模块,返回 (modules, error_msg)"""    if VBA_Parser is None:        return [], "未安装 oletools,请运行:pip install oletools"    try:        parser = VBA_Parser(excel_path)    except Exception as e:        return [], f"无法解析文件:{e}"    # FIX: use try/finally to guarantee parser.close() even on exceptions    try:        if not parser.detect_vba_macros():            return [], "未检测到 VBA 代码"        modules = []        seen_names: dict[strint] = {}  # 处理同名模块        for filename, stream_path, vba_filename, vba_code in parser.extract_macros():            type_id, type_label = _guess_module_type(vba_filename, stream_path)            # 同名模块加后缀            base = vba_filename            if base in seen_names:                seen_names[base] += 1                vba_filename = f"{base}_{seen_names[base]}"            else:                seen_names[base] = 0            modules.append({                "name": vba_filename,                "type_id": type_id,                "type_label": type_label,                "code": vba_code.strip(),                "stream_path": stream_path,            })    finally:        parser.close()    return modules, None# ─────────────────────────────────────────────#  内容生成(单文件)# ─────────────────────────────────────────────def _header_info(excel_name: str, modules: list[dict]) -> dict:    # FIX: single pass with Counter instead of 4 separate sum() iterations    counts = Counter(m["type_id"for m in modules)    return {        "excel_name": excel_name,        "timestamp": datetime.now().strftime("%Y-%m-%d %H:%M:%S"),        "total"len(modules),        "userforms": counts[3],        "doc_mods":  counts[100],        "std_mods":  counts[1],        "cls_mods":  counts[2],    }def build_single_md(excel_name: str, modules: list[dict]) -> str:    h = _header_info(excel_name, modules)    lines = [        f"# VBA 导出:{h['excel_name']}",        "",        f"| 项目 | 值 |",        f"|------|---|",        f"| 导出时间 | {h['timestamp']} |",        f"| 模块总数 | {h['total']} |",        f"| 标准模块 | {h['std_mods']} |",        f"| 类模块   | {h['cls_mods']} |",        f"| 文档模块 | {h['doc_mods']} |",        f"| 用户窗体 | {h['userforms']} |",        "",        "---",        "",    ]    for i, mod in enumerate(modules, 1):        lines += [            f"## {i}{mod['name']}",            "",            f"> **类型**:{mod['type_label']}  ",            f"> **流路径**:`{mod['stream_path']}`",            "",            "```vba",            mod["code"],            "```",            "",            "---",            "",        ]    return "\n".join(lines)def build_single_txt(excel_name: str, modules: list[dict]) -> str:    h = _header_info(excel_name, modules)    SEP  = "=" * 65    THIN = "-" * 65    lines = [        SEP,        f"  VBA 导出:{h['excel_name']}",        f"  导出时间:{h['timestamp']}",        f"  模块总数:{h['total']}(标准:{h['std_mods']} 类:{h['cls_mods']}"        f" 文档:{h['doc_mods']} 窗体:{h['userforms']})",        SEP,        "",    ]    for i, mod in enumerate(modules, 1):        lines += [            THIN,            f"  [{i}/{h['total']}]  模块名:{mod['name']}",            f"         类型:{mod['type_label']}",            THIN,            mod["code"],            "",        ]    return "\n".join(lines)# ─────────────────────────────────────────────#  内容生成(多文件,每个模块单独)# ─────────────────────────────────────────────def build_module_md(excel_name: str, mod: dict, index: int, total: int,                    ts: str) -> str:    # FIX: accept shared timestamp instead of calling datetime.now() per module    return "\n".join([        f"# {mod['name']}",        "",        f"| 项目 | 值 |",        f"|------|---|",        f"| 来源文件 | {excel_name} |",        f"| 模块类型 | {mod['type_label']} |",        f"| 序号     | {index} / {total} |",        f"| 导出时间 | {ts} |",        "",        "```vba",        mod["code"],        "```",        "",    ])def build_module_txt(excel_name: str, mod: dict, index: int, total: int,                     ts: str) -> str:    # FIX: accept shared timestamp instead of calling datetime.now() per module    SEP = "=" * 65    return "\n".join([        SEP,        f"  模块名:{mod['name']}",        f"  类型:  {mod['type_label']}",        f"  来源:  {excel_name}  [{index}/{total}]",        f"  时间:  {ts}",        SEP,        "",        mod["code"],        "",    ])def build_module_bas(mod: dict) -> str:    return mod["code"]# ─────────────────────────────────────────────#  文件名安全化# ─────────────────────────────────────────────# FIX: use str.translate for a single-pass replacement — faster and cleaner_UNSAFE_CHARS = str.maketrans(r'\/:*?"<>|'"_________")def safe_name(name: str) -> str:    return name.translate(_UNSAFE_CHARS)# ─────────────────────────────────────────────#  导出逻辑# ─────────────────────────────────────────────def export_excel(excel_path: str, out_root: str,                 formats: list[str], multi_file: bool,                 log_fn) -> bool:    """    处理单个 Excel 文件。    formats: 包含 "md" / "txt" / "bas" 的列表    multi_file: True=多文件模式,False=单文件模式    log_fn: 回调函数,接收一行字符串    返回 True 表示成功    """    excel_name = os.path.splitext(os.path.basename(excel_path))[0]    modules, error = extract_vba_modules(excel_path)    if error:        log_fn(f"  ❌ {error}")        return False    if not modules:        log_fn("  ⚠  未发现任何 VBA 模块,跳过")        return False    uf_count = sum(1 for m in modules if m["type_id"] == 3)    log_fn(f"  ✓  发现 {len(modules)} 个模块(含 {uf_count} 个 UserForm)")    # FIX: compute shared timestamp once for all modules in this batch    ts = datetime.now().strftime("%Y-%m-%d %H:%M:%S")    try:        if multi_file:            sub_dir = os.path.join(out_root, safe_name(excel_name))            os.makedirs(sub_dir, exist_ok=True)            total = len(modules)            for idx, mod in enumerate(modules, 1):                fname = safe_name(mod["name"])                for fmt in formats:                    filepath = os.path.join(sub_dir, f"{fname}.{fmt}")                    if fmt == "md":                        content = build_module_md(excel_name, mod, idx, total, ts)                    elif fmt == "txt":                        content = build_module_txt(excel_name, mod, idx, total, ts)                    else:  # bas                        content = build_module_bas(mod)                    with open(filepath, "w", encoding="utf-8"as f:                        f.write(content)            log_fn(f"  📁 多文件已保存至:{sub_dir}  ({len(modules)} 个模块 × {len(formats)} 种格式)")        else:            for fmt in formats:                filepath = os.path.join(out_root, f"{safe_name(excel_name)}.{fmt}")                if fmt == "md":                    content = build_single_md(excel_name, modules)                elif fmt == "txt":                    content = build_single_txt(excel_name, modules)                # bas 在单文件模式下被禁用,不会出现                with open(filepath, "w", encoding="utf-8"as f:                    f.write(content)                log_fn(f"  📄 已保存:{os.path.basename(filepath)}")    except Exception as e:        log_fn(f"  ❌ 保存失败:{e}")        return False    return True# ─────────────────────────────────────────────#  UI# ─────────────────────────────────────────────class App:    PAD = {"padx"10"pady"5}    def __init__(self, root: tk.Tk):        self.root = root        self.root.title("VBA 导出工具")        self.root.geometry("700x600")        self.root.minsize(600500)        # 状态变量        self.file_list: list[str] = []        self.output_dir  = tk.StringVar()        self.fmt_md      = tk.BooleanVar(value=True)        self.fmt_txt     = tk.BooleanVar(value=False)        self.fmt_bas     = tk.BooleanVar(value=False)        self.org_mode    = tk.StringVar(value="single")        self._build_ui()        self._sync_bas_lock()    # ── 界面构建 ──────────────────────────────    def _build_ui(self):        p = self.PAD        # ── 文件列表区域 ──        file_frame = ttk.LabelFrame(self.root, text="Excel 文件(支持多选)", padding=8)        file_frame.pack(fill="both", expand=False, **p)        list_area = ttk.Frame(file_frame)        list_area.pack(fill="both", expand=True)        self.listbox = tk.Listbox(list_area, height=6, selectmode=tk.EXTENDED,                                  font=("Consolas"9))        sb = ttk.Scrollbar(list_area, orient="vertical", command=self.listbox.yview)        self.listbox.configure(yscrollcommand=sb.set)        self.listbox.pack(side="left", fill="both", expand=True)        sb.pack(side="left", fill="y")        btn_col = ttk.Frame(file_frame)        btn_col.pack(side="right", fill="y", padx=(80))        ttk.Button(btn_col, text="添加文件", width=12,                   command=self._add_files).pack(pady=2)        ttk.Button(btn_col, text="移除选中", width=12,                   command=self._remove_selected).pack(pady=2)        ttk.Button(btn_col, text="清空列表", width=12,                   command=self._clear_files).pack(pady=2)        # ── 输出目录 ──        dir_frame = ttk.LabelFrame(self.root, text="输出目录", padding=8)        dir_frame.pack(fill="x", **p)        ttk.Entry(dir_frame, textvariable=self.output_dir).pack(            side="left", fill="x", expand=True)        ttk.Button(dir_frame, text="浏览", command=self._browse_dir).pack(            side="left", padx=(60))        # ── 导出选项 ──        opt_frame = ttk.LabelFrame(self.root, text="导出选项", padding=8)        opt_frame.pack(fill="x", **p)        # 格式行        fmt_row = ttk.Frame(opt_frame)        fmt_row.pack(fill="x", pady=3)        ttk.Label(fmt_row, text="输出格式:", width=11, anchor="w").pack(side="left")        self.cb_md  = ttk.Checkbutton(fmt_row, text=".md(推荐,AI 友好)",                                       variable=self.fmt_md,                                       command=self._sync_bas_lock)        self.cb_md.pack(side="left", padx=6)        self.cb_txt = ttk.Checkbutton(fmt_row, text=".txt",                                       variable=self.fmt_txt,                                       command=self._sync_bas_lock)        self.cb_txt.pack(side="left", padx=6)        self.cb_bas = ttk.Checkbutton(fmt_row, text=".bas",                                       variable=self.fmt_bas,                                       command=self._sync_bas_lock)        self.cb_bas.pack(side="left", padx=6)        # 文件组织行        org_row = ttk.Frame(opt_frame)        org_row.pack(fill="x", pady=3)        ttk.Label(org_row, text="文件组织:", width=11, anchor="w").pack(side="left")        self.rb_single = ttk.Radiobutton(            org_row, text="单文件(所有模块合并)",            variable=self.org_mode, value="single",            command=self._sync_bas_lock)        self.rb_single.pack(side="left", padx=6)        self.rb_multi = ttk.Radiobutton(            org_row, text="多文件(每模块独立保存)",            variable=self.org_mode, value="multi",            command=self._sync_bas_lock)        self.rb_multi.pack(side="left", padx=6)        # 提示标签        self.hint_label = ttk.Label(opt_frame, text="", foreground="#888888")        self.hint_label.pack(anchor="w", padx=2)        # ── 开始按钮 ──        self.btn_export = ttk.Button(self.root, text="▶  开始导出",                                      command=self._start_export)        self.btn_export.pack(pady=8, ipadx=20, ipady=4)        # ── 日志区域 ──        log_frame = ttk.LabelFrame(self.root, text="日志", padding=8)        log_frame.pack(fill="both", expand=True, **p)        self.log_box = tk.Text(log_frame, state="disabled", wrap="word",                                font=("Consolas"9), background="#1e1e1e",                                foreground="#d4d4d4", insertbackground="white")        log_sb = ttk.Scrollbar(log_frame, orient="vertical",                                command=self.log_box.yview)        self.log_box.configure(yscrollcommand=log_sb.set)        self.log_box.pack(side="left", fill="both", expand=True)        log_sb.pack(side="left", fill="y")        # 彩色标签        self.log_box.tag_configure("ok",    foreground="#6abe6a")        self.log_box.tag_configure("err",   foreground="#f44747")        self.log_box.tag_configure("warn",  foreground="#ddbf5e")        self.log_box.tag_configure("title", foreground="#9cdcfe")    # ── 控件逻辑 ─────────────────────────────    def _sync_bas_lock(self):        """若勾选 .bas 则强制多文件并禁用单文件选项"""        if self.fmt_bas.get():            self.org_mode.set("multi")            self.rb_single.configure(state="disabled")            self.hint_label.configure(                text="  ℹ  .bas 格式仅支持多文件模式(每模块独立 .bas 文件)")        else:            self.rb_single.configure(state="normal")            self.hint_label.configure(text="")    def _add_files(self):        paths = filedialog.askopenfilenames(            title="选择 Excel 文件",            filetypes=[                ("Excel 含宏文件""*.xlsm *.xlam *.xls"),                ("所有 Excel""*.xlsx *.xlsm *.xls *.xlam"),                ("所有文件""*.*"),            ],        )        if not paths:            return        # ✅ 同步第一个文件目录        first_path = os.path.abspath(paths[0])        d = os.path.dirname(first_path)        self.output_dir.set(d)        added = 0        for p in paths:            if p not in self.file_list:                self.file_list.append(p)                self.listbox.insert("end", os.path.basename(p))                added += 1        if added:            self._log(f"已添加 {added} 个文件,共 {len(self.file_list)} 个""title")    def _remove_selected(self):        for i in reversed(self.listbox.curselection()):            self.listbox.delete(i)            self.file_list.pop(i)    def _clear_files(self):        self.listbox.delete(0"end")        self.file_list.clear()    def _browse_dir(self):        d = filedialog.askdirectory(title="选择输出目录")        if d:            self.output_dir.set(d)    # ── 日志 ──────────────────────────────────    def _log(self, msg: str, tag: str = ""):        def _write():            self.log_box.configure(state="normal")            self.log_box.insert("end", msg + "\n", tag)            self.log_box.see("end")            self.log_box.configure(state="disabled")        self.root.after(0, _write)    # ── 导出入口 ──────────────────────────────    def _start_export(self):        if not self.file_list:            messagebox.showwarning("提示""请先添加 Excel 文件")            return        if not self.output_dir.get():            messagebox.showwarning("提示""请选择输出目录")            return        if not (self.fmt_md.get() or self.fmt_txt.get() or self.fmt_bas.get()):            messagebox.showwarning("提示""请至少选择一种输出格式")            return        self.btn_export.configure(state="disabled", text="导出中…")        threading.Thread(target=self._run_export, daemon=True).start()    def _run_export(self):        # FIX: cleaner list comprehension without extra parentheses        formats = [fmt for fmt, var in [("md"self.fmt_md),                                         ("txt"self.fmt_txt),                                         ("bas"self.fmt_bas)] if var.get()]        multi    = self.org_mode.get() == "multi"        out_root = self.output_dir.get()        files    = list(self.file_list)        self._log(f"\n{'─'*55}""title")        self._log(f"  开始导出  {len(files)} 个文件  格式:{formats}  "                  f"模式:{'多文件'if multi else'单文件'}""title")        self._log(f"{'─'*55}""title")        success = 0        for i, excel_path in enumerate(files, 1):            fname = os.path.basename(excel_path)            self._log(f"\n[{i}/{len(files)}{fname}""title")            # FIX: pass self._log directly instead of wrapping in a lambda            ok = export_excel(excel_path, out_root, formats, multi,                               log_fn=self._log)            if ok:                success += 1                self._log("  ✅ 完成""ok")            else:                self._log("  ❌ 跳过""err")        self._log(f"\n{'─'*55}""title")        tag = "ok" if success == len(files) else "warn"        self._log(f"  全部完成:成功 {success} / {len(files)} 个文件", tag)        self._log(f"{'─'*55}\n""title")        self.root.after(0lambdaself.btn_export.configure(            state="normal", text="▶  开始导出"))# ─────────────────────────────────────────────#  主程序# ─────────────────────────────────────────────if __name__ == "__main__":    if VBA_Parser is None:        import sys        print("请先安装依赖:pip install oletools")        sys.exit(1)    root = tk.Tk()    App(root)    root.mainloop()
好啦,今天就聊这么多,我们下期再见。

写在最后

1、目前所谓的AI编程,并不是小龙虾、vibe coding之类的,主要是使用Claude Pro网页版对话,我提需求,它写代码,我再测试。

2、关于公众号(橱窗)推荐的商品,都是优质的安全食品、良心食品,不掺不兑,可放心食用,欢迎尝试。

3、原来的合谷医疗企业微信不再添加新成员,逐渐停止服务。

~~~~~~End~~~~~~
汤姆店微信小程序高品质食用油、茶叶、牛奶、有机大米、粉条、腐竹、小米、蓝莓原汁、枸杞、枸杞原浆、纯粮白酒、蓝牙耳机、充电宝、皮带、棒球帽、男士内裤......立即扫码注册,优质商品触手可及,分销店铺即刻拥有,分享赚佣金
AI实战编程交流:发送案例文件。
如果想获取案例文件的,请添加左侧微信联系,获取分享方式。目前是免费分享。

喜欢就点个、点在看留言评论、分享一下呗!感谢支持!

案例文件分享说明(免费

  • 请添加上方微信(wx809840),获取案例文件分享方式。如有定制需求,亦可通过微信联系。

  • AI编程、Python、VBA相关问题,请在文章下面留言讨论!请不要发私信

    最新文章

    随机文章

    基本 文件 流程 错误 SQL 调试
    1. 请求信息 : 2026-07-04 08:12:26 HTTP/2.0 GET : https://f.mffb.com.cn/a/491746.html
    2. 运行时间 : 0.103429s [ 吞吐率:9.67req/s ] 内存消耗:4,914.84kb 文件加载:140
    3. 缓存信息 : 0 reads,0 writes
    4. 会话信息 : SESSION_ID=9bd97db5e257c47cc551436c43a45def
    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.000508s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
    2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.000781s ]
    3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.000319s ]
    4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000270s ]
    5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000470s ]
    6. SELECT * FROM `set` [ RunTime:0.000192s ]
    7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.000563s ]
    8. SELECT * FROM `article` WHERE `id` = 491746 LIMIT 1 [ RunTime:0.000898s ]
    9. UPDATE `article` SET `lasttime` = 1783123946 WHERE `id` = 491746 [ RunTime:0.010471s ]
    10. SELECT * FROM `fenlei` WHERE `id` = 66 LIMIT 1 [ RunTime:0.000280s ]
    11. SELECT * FROM `article` WHERE `id` < 491746 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.004633s ]
    12. SELECT * FROM `article` WHERE `id` > 491746 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.000892s ]
    13. SELECT * FROM `article` WHERE `id` < 491746 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.001082s ]
    14. SELECT * FROM `article` WHERE `id` < 491746 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.002938s ]
    15. SELECT * FROM `article` WHERE `id` < 491746 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.006206s ]
    0.104977s