当前位置:首页>python>AFSim_实用工具_大模型对话Python环境集成

AFSim_实用工具_大模型对话Python环境集成

  • 2026-06-30 14:52:44
AFSim_实用工具_大模型对话Python环境集成

大模型对话Python环境集成

1

 前言

经过快2个月断断续续的将大模型过了一遍,算是基本对Ai应用开发进行了一定的扫盲,以前对Ai认知几乎为0的时候,看到各种LLM、Prompt、RAG、Agents、MCP、Skills等等名词就眼花,完全不知道他们之间的关系,现在勉强能理解他们之间的关系了。
但是我呢肯定讲不了LLM的基础(因为我也是个半吊子),这个需要大家自行去补课。本文也就是先来打个基础,尝试将Python环境和基本的LLM对话能力在afsim的框架下进行集成,后续理论上就可在此基础上做扩展,因此本文可能对afsim本身的能力提升作用不大,大家捡感兴趣的不是看看就行了。
效果如下视频:
已关注
关注
重播 分享
下面开始搭建流程介绍:

2

 wizard插件

首先是afsim相关的插件集成。之所以首先选wizard来做,一是因为后面会考虑基于LLM来做想定智能生成,二是之前没有写过wizard相关的插件。所以本文就先把创建wizard插件的基本过程进行记录一下。

1)插件框架

之前有文章讲过wkf插件和warlock插件的创建方法wkf界面开发和插件扩展》《天线方向图实时绘制插件》,而wizard插件的创建方法跟warlock大概是类似的,就是在插件注册时,将最后那个all参数改为wizard即可。

同样的,既然创建的是wiard的插件,那么我们就直接从wizard的插件基类继承,同样可以获得wizard框架封装好的一些类和方法。

下面是warlock插件类的头文件和实现文件代码:

// HSWizardLLMPlugin.hpp#ifndef HSWizardLLMPlugin_HPP#define HSWizardLLMPlugin_HPP#include<QObject>#include"Plugin.hpp"class HSWizardLLMPlugin : public wizard::Plugin{public:    HSWizardLLMPlugin(const QString& aName, const size_t aUniqueId);    ~HSWizardLLMPlugin() override;};#endif// HSWizardLLMPlugin_HPP
// HSWizardLLMPlugin.cpp#include"HSWizardLLMPlugin.hpp"#include<WkfEnvironment.hpp>#include<WkfMainWindow.hpp>WKF_PLUGIN_DEFINE_SYMBOLS(HSWizardLLMPlugin,    QObject::tr("HSWizard LLM").toStdString().c_str(),    QObject::tr("LLM Dialog with python.").toStdString().c_str(),"wizard");HSWizardLLMPlugin::HSWizardLLMPlugin(const QString& aName, const size_t aUniqueId)   : wizard::Plugin(aName, aUniqueId){}HSWizardLLMPlugin::~HSWizardLLMPlugin(){}

编译运行后,能够从PluginManager界面上查看到插件已经成功加载。

2)LLM对话框

接下来做一个LLM对话框,这个界面可以根据之前的wkf开发教程来选择添加哪种类型的界面,过程就不重复了,查看之前的文章就行了,我这里做成DockWidget先,效果如下:

以上是基本的wizard插件创建,现在点击发送也没有任何反应,下面先来解决Python集成的问题。

3

 Python集成

目前要做LLM开发,如果仅仅是做问答对话式那么其实有很多选择,各种语言通过封装一下LLM提供商的接口就能做一个对话框了。但如果要真正做一个Ai应用,光有对话是不够的,还要根据Ai的回答做对应的数据处理。而Ai应用开发的大部分工具都是用Python语言写的,要集成到afsim的C++/Qt环境的话就需要对Python进行集成

不过这个技术已经很成熟了,网上一抓一大把,我就不献丑讲太多了。本文只把过程和遇到的问题进行记录,大家参考参考就行。

我用的是python3.12.7,我之前安装的是更高版本的Python3.13,但在安装LangChain时出过问题,所以又降低到这个版本了。

1)cmake配置

这里主要将Python安装路径的头文件和库文件路径配置到本插件的CMakeList文件,如下:

# 查找Pythonfind_package(Python 3.12 REQUIRED COMPONENTS Interpreter Development)# 输出找到的Python信息message(STATUS "Python executable: ${Python_EXECUTABLE}")message(STATUS "Python include path: ${Python_INCLUDE_DIRS}")message(STATUS "Python library path: ${Python_LIBRARIES}")# Python 在 Debug 模式下会链接带 _d 后缀的库set(PYTHON_LIB_DEBUG "${Python_LIBRARY_DIRS}/python${Python_VERSION_MAJOR}${Python_VERSION_MINOR}_d.lib")set(PYTHON_LIB_RELEASE "${Python_LIBRARY_DIRS}/python${Python_VERSION_MAJOR}${Python_VERSION_MINOR}.lib")# 包含头文件并链接库target_include_directories(HSWizardLLMPlugin PRIVATE ${Python_INCLUDE_DIRS})target_link_libraries(HSWizardLLMPlugin    $<$<CONFIG:Debug>:${PYTHON_LIB_DEBUG}>    $<$<CONFIG:Release>:${PYTHON_LIB_RELEASE}>)

再次对afsim源码进行cmake,会输出找到的python信息。此时在项目属性里也可以看到正确连接了系统安装的Python库了。

2)Python集成集成代码

要调用Python代码,需要首先对Python在Qt中的环境进行初始化,退出时需要清理资源。我这里专门封装了一个类PyBridge,因为要流式输出到界面,所以需要用线程的方式来调Python函数,不然在Qt界面输出时会出现假死的现象,原因就是与Qt的Ui更新线程都在主线程而阻塞了界面刷新。因此这个类是继承QThread的,在run方法里面进行初始化

voidPyBridge::run(){    static QString prompt;    // 注册回调    PyImport_AppendInittab("qt_callback", &PyInit_qt_callback);    // 初始化python解释器.C/C++中调用Python之前必须先初始化解释器    Py_Initialize();    // 判断python解析器的是否已经初始化完成    if (!Py_IsInitialized())        qDebug() << "Py_Initialize fail";    else        qDebug() << "Py_Initialize success";    while (!m_isStop)    {        QThread::msleep(1);        m_mutex.lock();        // 有数据才执行        if (m_prompt.isEmpty()) {            m_mutex.unlock();            continue;        }        else {            prompt.swap(m_prompt);            m_mutex.unlock();            // TODO            prompt.clear();        }    }    // 销毁自上次调用Py_Initialize()以来创建的所有子解释器。    Py_Finalize();}

此时编译会报下图错误:

点进去后查看时python头文件目录下的object.h文件说PyType_Slot这个结构体问题。

起初一头雾水,明明上面就是这个PyType_Slot的定义,这里怎么会报错呢,后来查了下网络,知道是因为上图的slots与Qt的关键字冲突了,挺隐蔽的。因此按以下修改就好了:

另外再注释掉57行的Debug定义来解决后续会遇到的无法解析的外部符号 __imp__Py_NegativeRefcount

再次编译时如果使用的是debug模式编译,链接时还会出现无法找到debug版的python312_d.lib,如下图

这个问题可以直接将Python安装目录下的python312.lib复制一份为python312_d.lib即可链接编译成功。

3)简单测试

上面编译成功后,我这里直接通过代码的方式测试环境是否正常,即在单击界面的发送按钮时,将输入的字符串添加到PyBridge中,由线程run函数执行一个print语句打印这个字符串,即//TODO下面添加以下代码

// 以上略// TODOPyRun_SimpleString(QString("print('%1')").arg(prompt).toStdString().c_str());// 以下略

编译后加载插件和执行这个语句,运行结果如下图:

注:如果控制台没有看到输出,需要从wizard项目属性->链接->系统,改为控制台类型,否则通过Python调用的print函数无法输出显示到控制台。

4)调用真正的Python脚本

把Python脚本语句直接写到C++代码里面执行,肯定不是我们想要的,我们想要的是在C++中直接执行py文件。所以首先创建一个chat.py文件里面定义一个方法接收传入的字符串,并将字符串倒序后返回。这里返回是通过回调的方式进行的,因为LLM作为流式输出时,C++端无需频繁调用,而只需要处理回调的数据就行。

首先,在PyBridge中实现回调:

// PyBridge.h#pragma once#include<QThread>#include<QMutex>#include<Python.h>class PyBridge  : public QThread{    Q_OBJECTpublic:    PyBridge(QObject *parent);    voidquery(const QString& prompt);voidstop();    // Python 调用的静态包装函数static PyObject* py_emitTriggered(PyObject* self, PyObject* args);signals:    // 回调的消息    voidtriggeredCallback(const QString& message);protected:virtualvoidrun()override;private:    bool m_isStop = false;    QString m_prompt;    QMutex m_mutex;};// 模块方法定义static PyMethodDef CallbackMethods[] ={    {"trigger_callback", PyBridge::py_emitTriggered, METH_VARARGS, "Trigger callback"},    {NULLNULL0NULL}};static struct PyModuleDef callback_module ={    PyModuleDef_HEAD_INIT,    "qt_callback",    NULL,    -1,    CallbackMethods};PyMODINIT_FUNC PyInit_qt_callback(void);
// PyBridge.cppPyObject* PyBridge::py_emitTriggered(PyObject* self, PyObject* args){    const char* message = nullptr;    if (!PyArg_ParseTuple(args, "s", &message)) {        return NULL;    }    // 发射信号    emit g_this->triggeredCallback(QString::fromUtf8(message));    return Py_BuildValue("");}PyMODINIT_FUNC PyInit_qt_callback(void){    return PyModule_Create(&callback_module);}

根据Pyhon回调机制,需要在Python环境初始化时,将回调对象进行注册,即在Py_Initialize()之前调用:

PyImport_AppendInittab("qt_callback", &PyInit_qt_callback);Py_Initialize();

char.py里定义一个函数:接收传入的字符串,倒序后通过回调返回到C++

import qt_callback # 这个模块就是上面代码注册到Python环境的# 回调实现def chat_with_callback(prompt):    s = prompt[::-1]    qt_callback.trigger_callback(s)

将这个py文件放到与bin同级的py_scripts目录里面,然后获取输入的字符串设置到PyBridge,run函数自动检测到有数据则开始调用在py文件里面的方法,代码如下:

voidPyBridge::run(){    static QString prompt;    // 注册回调    PyImport_AppendInittab("qt_callback", &PyInit_qt_callback);    // 初始化python解释器.C/C++中调用Python之前必须先初始化解释器    Py_Initialize();    // 判断python解析器的是否已经初始化完成    if (!Py_IsInitialized())        qDebug() << "Py_Initialize fail";    else        qDebug() << "Py_Initialize success";    while (!m_isStop)    {        QThread::msleep(1);        m_mutex.lock();        if (m_prompt.isEmpty()) {            m_mutex.unlock();            continue;        }        else {            prompt.swap(m_prompt);            m_mutex.unlock();            // 添加 Python 模块路径(如果需要)            PyRun_SimpleString("import sys");            PyRun_SimpleString("sys.path.append('../py_scripts')");  // 添加当前目录到搜索路径            // 加载 python 脚本            PyObject* pModule = PyImport_ImportModule("chat");  // 脚本名称,不带.py            if (pModule) {                // 流式回复调用                callFlow(pModule, prompt);                // 释放模块                Py_DECREF(pModule);            }            else {                qDebug() << QStringLiteral("模块导入失败");                PyErr_Print();            }            prompt.clear();        }}    // 销毁自上次调用Py_Initialize()以来创建的所有子解释器。    Py_Finalize();}
// 流式回复void PyBridge::callFlow(PyObject* pModule, const QString& prompt){    // 获取函数对象    PyObject* pFunc = PyObject_GetAttrString(pModule, "chat_with_callback");    if (pFunc && PyCallable_Check(pFunc)) {        // 准备字符串参数(将 QString 转为 Python 字符串)        PyObject* pArgs = PyTuple_New(1);        PyObject* pStr = PyUnicode_FromString(prompt.toUtf8().constData());        PyTuple_SetItem(pArgs, 0, pStr);        // 调用 Python 函数,这里会阻塞直到流式回复完成        PyObject* pResult = PyObject_CallObject(pFunc, pArgs);        // 处理返回值        if (pResult) {            // 释放返回值            Py_DECREF(pResult);        }        else {            qDebug() << QStringLiteral("函数调用失败");            PyErr_Print();        }        // 释放资源        Py_DECREF(pArgs);        Py_DECREF(pFunc);    }    else {        qDebug() << QStringLiteral("无法找到函数或函数不可调用");        PyErr_Print();    }}

编译后,在下方的输入框中输入字符串,点击发送后,在上方的框中显示返回的字符串(注:还没有涉及到LLM的流式回复):

已关注
关注
重播 分享

4

LLM调用

上面就把Python的环境集成好了,下面就是Python端的代码实现了,我这里使用先使用OpenAi来做LLM的调用,openai直接用pip install openai即可,然后增加chat_with_callback函数来调用LLM,并通过流式输出到C++/Qt界面,代码如下:
注:代码里面我是用的通义千问大模型的链接,大家可以自行修改!
import qt_callbackimport osfrom openai import OpenAIdef chat_with_callback(prompt):    messages = [{"role""user""content": prompt}]    # 创建client客户端    client = OpenAI(        api_key=os.getenv("DASHSCOPE_API_KEY"),        base_url="https://dashscope.aliyuncs.com/compatible-mode/v1",    )    response = client.chat.completions.create(        model="qwen3.6-flash",  # 大模型名称        messages=messages,        temperature=0,        # temperature采样温度:取值范围[0, 2),表示模型输出的随机性,0表示随机性最小。        stream=True# 此处设置流式回复    )    for chunk in response:        if chunk.choices[0].finish_reason:            qt_callback.finish_callback()            break        if chunk.choices[0].delta.content == None:            continue        s = chunk.choices[0].delta.content;        # 回调到C++/Qt        qt_callback.trigger_callback(s)

注:

1、上面的代码是无法直接在Python环境运行的,因为qt_callback模块是C++注入的

2、如果出现PyImport_ImportModule时,模块导入失败则检查系统Python环境里面是否安装了OpenAi的库

最后的效果就是本文开篇的视频。

5

后记

以上就是本文介绍的在AFSIM的wizard工具中集成Python环境并实现大模型对话的功能。参考网上文章做了C++/Qt与Python混合编程内容,包括CMake配置Python依赖、解决Qt与Python头文件的slots关键字冲突、处理Debug模式下Python库链接问题等。为实现流畅的流式对话体验,设计了基于QThread的PyBridge桥接类实现C++与Python之间的双向通信。最后基于OpenAI兼容接口集成了通义千问大模型,实现了完整的流式对话功能。

但目前仅仅是问答式对话,跟afsim本身还没有产生关系,后续可以在这个基础上扩展AI应用能力(如智能想定生成、RAG检索增强、Agent决策等)。

外部数据统一接入分发中间件

服务端仿真引擎框架

天线方向图实时绘制插件

wkf界面开发和插件扩展

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-07-03 09:46:21 HTTP/2.0 GET : https://f.mffb.com.cn/a/492406.html
  2. 运行时间 : 0.087480s [ 吞吐率:11.43req/s ] 内存消耗:4,693.55kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=02afe508b06039a3fdf87946a8a367a6
  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.000640s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.000836s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.000337s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000299s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000487s ]
  6. SELECT * FROM `set` [ RunTime:0.000189s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.000612s ]
  8. SELECT * FROM `article` WHERE `id` = 492406 LIMIT 1 [ RunTime:0.000475s ]
  9. UPDATE `article` SET `lasttime` = 1783043181 WHERE `id` = 492406 [ RunTime:0.011389s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 66 LIMIT 1 [ RunTime:0.000277s ]
  11. SELECT * FROM `article` WHERE `id` < 492406 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.000432s ]
  12. SELECT * FROM `article` WHERE `id` > 492406 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.000856s ]
  13. SELECT * FROM `article` WHERE `id` < 492406 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.001198s ]
  14. SELECT * FROM `article` WHERE `id` < 492406 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.000772s ]
  15. SELECT * FROM `article` WHERE `id` < 492406 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.000979s ]
0.089167s