当前位置:首页>python>一行代码没写,我用Python写了个“一键加密”神器,老板当场给我加薪

一行代码没写,我用Python写了个“一键加密”神器,老板当场给我加薪

  • 2026-06-30 11:08:32
一行代码没写,我用Python写了个“一键加密”神器,老板当场给我加薪
点击上方蓝字订阅!

在 Python 的世界里,分发代码一直是个让人又爱又恨的话题。作为一门解释型语言,.py 文件天生就是明文,即使你用了 PyInstaller 打包成 exe,有经验的人依然可以从临时目录里把源码扒拉出来。真正接近“编译语言”级别的保护方案,其实早就藏在 Python 生态的核心工具链里——Cython。Cython 的本质是一个桥梁,它能把 Python 代码翻译成 C 语言的等价代码,然后再调用本地 C 编译器(Windows 上是 MSVC 或 MinGW,Linux 上是 GCC)生成一个共享库,也就是 Windows 下的 .pyd 文件和 Linux 下的 .so 文件。这个过程不仅仅是代码格式的转换,它实际上让 Python 的解释执行路径被一条更底层的 C 调用链所替代,生成的二进制文件直接与 CPython 的 ABI 交互,即便反编译也只能得到晦涩的汇编指令,逆向难度呈指数级上升。而我们今天构建的这个工具,就是用图形界面把这套复杂的命令行操作封装起来,再加上批量处理的逻辑,让它变成一把真正趁手的瑞士军刀。

在深入代码之前,我们得先理解一下 Cython 编译流程中一个经常被忽略但却至关重要的参数:language_level。如果你直接调用 cythonize 而不指定它,生成的 C 代码会默认使用 Python 2 的语义,这在当下几乎全是 Python 3 的环境里会引发大量莫名其妙的语法警告甚至错误。我们在工具的后台线程中硬编码了 language_level=3,就是为了让 Cython 生成的 C 代码严格遵循 Python 3 的语法规则,包括类型注解、异步函数等新特性都能被正确处理。从数学抽象的角度看,Cython 的工作可以看作一个映射函数 ,其中  是 Python 源码空间, 是 C 语言源码空间。而我们通过 setup.py 调用的 build_ext 则是第二个映射 ,其中  是目标平台的机器码扩展模块空间。复合映射  就是我们工具核心要做的事情,只不过我们用一个 Qt 界面把这个抽象的复合过程变成了点击按钮的直观操作。

图形界面程序最忌讳的就是在执行耗时任务时让窗口“假死”。用户点击“开始编译”后,如果主线程跑去调用编译器并且等它返回,整个窗口就会像被冰冻一样,点击任何地方都没反应,Windows 甚至会给窗口盖上一层白色的“未响应”蒙版。解决这个问题的标准范式是 Qt 的多线程机制,具体来说就是 QThread。我们把整个编译任务塞进一个继承自 QThread 的 BatchCompilerThread 类里,在 run() 方法中执行那套“创建临时目录、生成 setup.py、调用 subprocess 运行编译器”的繁重劳动。与此同时,主线程(也就是 UI 线程)则继续快乐地运转它的事件循环,随时准备处理来自子线程的信号。我们定义了 output_signal 用来实时更新日志框,progress_signal 用来驱动进度条,finished_signal 则在任务结束时重新激活那些被暂时禁用的按钮。这种信号与槽的设计模式在 Qt 框架里被抽象为一种观察者模式的变体,它保证了线程间通信的安全性和低耦合,是整个工具用户体验流畅度的基石。

再来说说批量处理的算法逻辑。当用户通过“添加文件夹”按钮导入一整个目录的 .py 文件时,我们并没有采用多进程并行编译的策略。你可能会问,为什么不并行?现在 CPU 核心那么多,同时编译多个文件不是更快吗?这里有一个微妙的工程权衡。Cython 调用 MSVC 或 GCC 时,编译器本身已经是高度并行化的,尤其在链接阶段它会尽可能占用系统资源。如果我们同时启动多个编译器进程,每个进程都在争抢文件 I/O 和内存带宽,反而会导致上下文切换开销剧增,整体编译时间不降反升。更致命的是,多个 cl.exe 同时写入临时目录可能会引发文件锁冲突,导致编译随机性失败。因此,我们选择了最稳妥的串行流水线模型:维护一个文件列表 ,对每个  依次执行“复制→编译→移动产物→清理”的原子操作。进度条的值更新遵循一个简单的线性关系:当前进度百分比 ,这种可预测的线性进度反馈反而比并行模式下忽快忽慢的进度跳变更能让用户心安。

代码实现上还有一处精巧的细节值得展开讲讲——临时目录的使用。如果你直接把 Cython 的编译输出指向源文件所在的目录,不仅会留下一堆 .c 中间文件和 build 垃圾文件夹,更危险的是如果编译过程中因为意外中断,正在生成的 .pyd 文件可能会损坏并覆盖掉用户原本可能存在的同名文件。我们通过 Python 内置的 tempfile.TemporaryDirectory 创建了一个上下文管理器,在这个沙盒环境里怎么折腾都不怕。编译成功后,再使用 shutil.move 把产物原子性地转移到用户指定的输出目录。这个转移操作在同一磁盘分区上是重命名操作,几乎瞬间完成,极大降低了文件损坏的风险。如果你在 Linux 或 macOS 下运行这个工具,会发现生成的扩展名是 .so 而不是 .pyd,代码里通过 sys.platform 做了自适应判断,这种跨平台的细节处理让工具不仅限于 Windows 开发者的工具箱。

最后,我想聊聊这个工具的深层价值——它其实是对 Python 语言“开放性”与“商业闭源性”这对矛盾体的一种优雅调解。Python 的哲学是开放、分享,但在商业环境中,核心算法的知识产权保护是刚需。用 Cython 编译成 .pyd 并不是绝对的加密,理论上依然存在逆向工程的可能,但它将逆向的门槛从“用记事本打开看看”提升到了“精通 x64 汇编与反混淆技术”的级别。对于绝大多数商业场景而言,这个门槛已经足够形成有效的法律和技术威慑。你可以把这个工具看作一个给 Python 项目穿上的“软猬甲”,它不影响 Python 本身的灵活性和开发效率,却在交付环节筑起了一道坚实的壁垒。希望这份完整的源码和背后的思考能够帮助你在下一个项目中游刃有余地保护自己的劳动成果,或许也能在某天下午,让你像当初的我一样,面对老板的需求时,微微一笑,三分钟搞定。

完整代码如下,保存为 py_to_pyd_gui.py 直接运行即可(需提前安装 PyQt5 与 Cython)。

import sys
import os
import shutil
import tempfile
import subprocess
from pathlib import Path

from PyQt5.QtWidgets import (
    QApplication, QMainWindow, QWidget, QVBoxLayout, QHBoxLayout,
    QPushButton, QLineEdit, QLabel, QTextEdit, QFileDialog, QMessageBox,
    QListWidget, QAbstractItemView, QProgressBar
)
from PyQt5.QtCore import QThread, pyqtSignal


classBatchCompilerThread(QThread):
    output_signal = pyqtSignal(str)
    progress_signal = pyqtSignal(int, int, str)
    finished_signal = pyqtSignal(int, int)

def__init__(self, file_list, output_dir):
        super().__init__()
        self.file_list = file_list
        self.output_dir = output_dir
        self._is_running = True

defstop(self):
        self._is_running = False

defrun(self):
        success_count = 0
        fail_count = 0
        total = len(self.file_list)

for idx, py_file in enumerate(self.file_list):
ifnot self._is_running:
                self.output_signal.emit("⚠️ 用户中止编译")
break

            self.progress_signal.emit(idx + 1, total, Path(py_file).name)
            self.output_signal.emit(f"\n--- 开始编译 ({idx+1}/{total}): {py_file} ---")

try:
try:
import Cython
except ImportError:
                    self.output_signal.emit("❌ 未安装 Cython,请执行: pip install cython")
                    fail_count += total - idx
break

                module_name = Path(py_file).stem

with tempfile.TemporaryDirectory() as temp_dir:
                    temp_path = Path(temp_dir)
                    src_copy = temp_path / f"{module_name}.py"
                    shutil.copy2(py_file, src_copy)

                    setup_code = f"""
from setuptools import setup
from Cython.Build import cythonize

setup(
    ext_modules=cythonize("{module_name}.py", language_level=3),
    script_args=['build_ext', '--inplace']
)
"""

                    (temp_path / "setup.py").write_text(setup_code, encoding='utf-8')

                    original_cwd = os.getcwd()
                    os.chdir(temp_dir)

try:
                        process = subprocess.Popen(
                            [sys.executable, "setup.py""build_ext""--inplace"],
                            stdout=subprocess.PIPE,
                            stderr=subprocess.STDOUT,
                            text=True,
                            encoding='utf-8',
                            errors='replace'
                        )

for line in process.stdout:
if line.strip():
                                self.output_signal.emit("  " + line.strip())

                        process.wait()
if process.returncode != 0:
                            self.output_signal.emit(f"❌ 编译失败,返回码: {process.returncode}")
                            fail_count += 1
continue

                        ext = ".pyd"if sys.platform == "win32"else".so"
                        compiled_files = list(temp_path.glob(f"{module_name}*{ext}"))
ifnot compiled_files:
                            compiled_files = list(temp_path.glob(f"*.{ext.split('.')[-1]}"))
ifnot compiled_files:
                            self.output_signal.emit("❌ 未找到生成的扩展文件")
                            fail_count += 1
continue

                        pyd_file = compiled_files[0]
                        self.output_signal.emit(f"✅ 生成: {pyd_file.name}")

                        os.makedirs(self.output_dir, exist_ok=True)
                        dest = Path(self.output_dir) / pyd_file.name
if dest.exists():
                            dest.unlink()
                        shutil.move(str(pyd_file), str(dest))
                        self.output_signal.emit(f"📁 保存至: {dest}")
                        success_count += 1

finally:
                        os.chdir(original_cwd)

except Exception as e:
                self.output_signal.emit(f"❌ 异常: {str(e)}")
                fail_count += 1

        self.finished_signal.emit(success_count, fail_count)


classMainWindow(QMainWindow):
def__init__(self):
        super().__init__()
        self.setWindowTitle("Py 批量转 Pyd 编译器")
        self.setMinimumSize(700550)

        central_widget = QWidget()
        self.setCentralWidget(central_widget)
        main_layout = QVBoxLayout(central_widget)

        ctrl_layout = QHBoxLayout()
        self.btn_add_files = QPushButton("📂 添加文件")
        self.btn_add_files.clicked.connect(self.add_files)
        self.btn_add_folder = QPushButton("📁 添加文件夹")
        self.btn_add_folder.clicked.connect(self.add_folder)
        self.btn_remove_selected = QPushButton("❌ 移除选中")
        self.btn_remove_selected.clicked.connect(self.remove_selected)
        self.btn_clear = QPushButton("🧹 清空列表")
        self.btn_clear.clicked.connect(self.clear_list)
        ctrl_layout.addWidget(self.btn_add_files)
        ctrl_layout.addWidget(self.btn_add_folder)
        ctrl_layout.addWidget(self.btn_remove_selected)
        ctrl_layout.addWidget(self.btn_clear)
        ctrl_layout.addStretch()
        main_layout.addLayout(ctrl_layout)

        self.file_list_widget = QListWidget()
        self.file_list_widget.setSelectionMode(QAbstractItemView.ExtendedSelection)
        main_layout.addWidget(QLabel("待编译文件列表(可多选移除):"))
        main_layout.addWidget(self.file_list_widget)

        out_layout = QHBoxLayout()
        out_layout.addWidget(QLabel("输出目录:"))
        self.out_edit = QLineEdit()
        self.out_edit.setPlaceholderText("默认为第一个文件的所在目录")
        out_layout.addWidget(self.out_edit)
        self.btn_out = QPushButton("浏览")
        self.btn_out.clicked.connect(self.browse_out)
        out_layout.addWidget(self.btn_out)
        main_layout.addLayout(out_layout)

        self.progress_bar = QProgressBar()
        self.progress_bar.setValue(0)
        self.progress_bar.setTextVisible(True)
        main_layout.addWidget(self.progress_bar)

        self.btn_compile = QPushButton("🚀 开始批量编译")
        self.btn_compile.clicked.connect(self.start_compile)
        main_layout.addWidget(self.btn_compile)

        main_layout.addWidget(QLabel("编译日志:"))
        self.log_text = QTextEdit()
        self.log_text.setReadOnly(True)
        main_layout.addWidget(self.log_text)

        self.compiler_thread = None

defadd_files(self):
        files, _ = QFileDialog.getOpenFileNames(
            self, "选择 Python 文件""""Python Files (*.py)"
        )
for f in files:
if f andnot self.is_file_in_list(f):
                self.file_list_widget.addItem(f)
        self.auto_set_output_dir()

defadd_folder(self):
        folder = QFileDialog.getExistingDirectory(self, "选择包含 .py 文件的文件夹")
if folder:
            py_files = list(Path(folder).glob("*.py"))
for pf in py_files:
                fpath = str(pf)
ifnot self.is_file_in_list(fpath):
                    self.file_list_widget.addItem(fpath)
            self.auto_set_output_dir()

defis_file_in_list(self, filepath):
for i in range(self.file_list_widget.count()):
if self.file_list_widget.item(i).text() == filepath:
returnTrue
returnFalse

defremove_selected(self):
for item in self.file_list_widget.selectedItems():
            self.file_list_widget.takeItem(self.file_list_widget.row(item))

defclear_list(self):
        self.file_list_widget.clear()

defauto_set_output_dir(self):
if self.file_list_widget.count() > 0andnot self.out_edit.text():
            first_file = self.file_list_widget.item(0).text()
            self.out_edit.setText(str(Path(first_file).parent))

defbrowse_out(self):
        dir_path = QFileDialog.getExistingDirectory(self, "选择输出目录")
if dir_path:
            self.out_edit.setText(dir_path)

defstart_compile(self):
if self.file_list_widget.count() == 0:
            QMessageBox.warning(self, "警告""请先添加要编译的 .py 文件")
return

        output_dir = self.out_edit.text().strip()
ifnot output_dir:
            output_dir = str(Path(self.file_list_widget.item(0).text()).parent)

        file_list = [self.file_list_widget.item(i).text() for i in range(self.file_list_widget.count())]

        self.log_text.clear()
        self.progress_bar.setMaximum(len(file_list))
        self.progress_bar.setValue(0)
        self.progress_bar.setFormat("准备编译...")

        self.set_controls_enabled(False)

        self.compiler_thread = BatchCompilerThread(file_list, output_dir)
        self.compiler_thread.output_signal.connect(self.append_log)
        self.compiler_thread.progress_signal.connect(self.update_progress)
        self.compiler_thread.finished_signal.connect(self.on_compile_finished)
        self.compiler_thread.start()

defset_controls_enabled(self, enabled):
        self.btn_add_files.setEnabled(enabled)
        self.btn_add_folder.setEnabled(enabled)
        self.btn_remove_selected.setEnabled(enabled)
        self.btn_clear.setEnabled(enabled)
        self.btn_out.setEnabled(enabled)
        self.btn_compile.setEnabled(enabled)

defappend_log(self, text):
        self.log_text.append(text)

defupdate_progress(self, current, total, filename):
        self.progress_bar.setValue(current)
        self.progress_bar.setFormat(f"正在编译 {current}/{total}{filename}")

defon_compile_finished(self, success, fail):
        self.set_controls_enabled(True)
        self.progress_bar.setFormat(f"完成!成功 {success} 个,失败 {fail} 个")
        QMessageBox.information(self, "编译结束"f"批量编译完成。\n成功: {success}\n失败: {fail}")


if __name__ == "__main__":
    app = QApplication(sys.argv)
    window = MainWindow()
    window.show()
    sys.exit(app.exec_())
 • end • 

陪伴是最长情的告白

 为你推送最实用的资讯 

识别二维码 关注我们 

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-07-04 06:45:35 HTTP/2.0 GET : https://f.mffb.com.cn/a/491029.html
  2. 运行时间 : 0.189906s [ 吞吐率:5.27req/s ] 内存消耗:4,484.10kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=88764757cff5101d11205a1fa16580be
  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.000476s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.000572s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.000252s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000307s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000561s ]
  6. SELECT * FROM `set` [ RunTime:0.002206s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.000691s ]
  8. SELECT * FROM `article` WHERE `id` = 491029 LIMIT 1 [ RunTime:0.007287s ]
  9. UPDATE `article` SET `lasttime` = 1783118735 WHERE `id` = 491029 [ RunTime:0.002843s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 66 LIMIT 1 [ RunTime:0.001013s ]
  11. SELECT * FROM `article` WHERE `id` < 491029 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.004971s ]
  12. SELECT * FROM `article` WHERE `id` > 491029 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.013855s ]
  13. SELECT * FROM `article` WHERE `id` < 491029 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.016451s ]
  14. SELECT * FROM `article` WHERE `id` < 491029 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.026140s ]
  15. SELECT * FROM `article` WHERE `id` < 491029 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.045377s ]
0.191372s