当前位置:首页>java>搭建个人AI本地助手,全部代码分享

搭建个人AI本地助手,全部代码分享

  • 2026-02-05 00:50:39
搭建个人AI本地助手,全部代码分享

现在谁的手机、电脑里没几个AI助手?但在线AI总有一堆痛点:怕隐私泄露、依赖网络、自定义功能受限,想改个话术都做不到——直到我自己搭建了个人AI本地助手,才发现AI装在自己电脑里有多香。

重点是:前后端代码、配置文件我已经全部备好(文末直接复制可用),你不用懂复杂编程、不用从零敲一行代码,只需跟着步骤做部署、避坑,30分钟就能拥有专属自己的AI本地助手,想怎么用就怎么用,数据全在自己手里,断网也能正常用!

先搞懂:为什么要搭本地”AI助手?(核心价值)

很多人会问:在线AIChatGPT、千问等)用着挺方便,为啥还要费劲搭本地的?其实只要你有隐私需求、想自定义功能,本地AI助手的优势就无可替代,尤其是有现成代码的情况下,落地后幸福感直接拉满:

✅ 隐私绝对安全,数据不上云不泄露

这是本地AI最核心的优势!不管是处理工作中的敏感文档、私人聊天记录,还是家里的琐事安排,所有数据都只存储在你自己的电脑里,不上传任何云端服务器,不用担心隐私泄露、数据被滥用——对于经常处理敏感信息、注重隐私的人来说,这一点就足以碾压所有在线AI

✅ 离线可用,无惧网络波动

不用再担心没网就用不了AI!搭建完成后,哪怕断网、出差没信号,只要打开电脑,就能随时调用AI助手——查资料、写文案、润色内容、解答疑问,全程离线响应,速度比在线AI更快,告别云端排队等待的烦恼。

✅ 自定义自由,完全适配你的需求

在线AI的功能都是固定的,想加个专属话术、改个响应逻辑、对接自己的本地文件,基本不可能。但你手里有前后端代码,搭建完成后,不用改核心代码,只需简单微调,就能让AI助手适配你的习惯——比如设置专属开场白、添加常用指令、对接本地文件夹,甚至可以自定义AI的语气(严肃、活泼、专业),打造真正属于自己的私人AI”

✅ 零成本落地,已有代码直接用

最关键的是,不用你花时间写代码、找教程、调试逻辑——前后端代码、配置文件已经全部备好(下方直接复制),你只需要做好部署这一步,不用懂编程、不用会敲命令(全程简化操作),普通人30分钟就能搞定,零技术门槛也能落地。

备好的完整代码(直接复制可用,无需修改)

提前说明:以下代码已调试完成,适配LMStudio本地大模型,支持流式输出、上下文记忆、聊天历史清空,无需你修改核心逻辑,复制后按步骤部署即可,重点看清楚代码对应文件夹,避免放错位置。

app.py:

from flask import Flask, render_template, request, jsonify, Response, stream_with_contextfrom flask_cors import CORSimport openaiimport jsonimport osfrom datetime import datetimeapp = Flask(__name__)CORS(app)# 加载配置文件def load_config():    """从 config.json 加载配置"""    config_path = os.path.join(os.path.dirname(__file__), 'config.json')    try:        with open(config_path, 'r', encoding='utf-8'as f:            config = json.load(f)        return config    except FileNotFoundError:        print(f"警告: 配置文件 {config_path} 不存在,使用默认配置")        return {            "openai_api_base""http://localhost:1234/v1",            "openai_api_key""lm-studio",            "model_name""local-model",            "flask_host""0.0.0.0",            "flask_port"5000,            "flask_debug"True,            "temperature"0.7,            "max_tokens"2000        }    except json.JSONDecodeError:        print(f"错误: 配置文件 {config_path} 格式错误")        raise# 加载配置config = load_config()# 配置 OpenAI API(兼容 LMStudio)openai.api_base = config.get("openai_api_base""http://localhost:1234/v1")openai.api_key = config.get("openai_api_key""lm-studio")# 存储聊天历史(实际应用中应使用数据库)chat_history = {}@app.route('/')def index():    """主页面"""    return render_template('index.html')@app.route('/api/chat', methods=['POST'])def chat():    """处理聊天请求,支持流式输出"""    data = request.json    message = data.get('message''')    session_id = data.get('session_id''default')    if not message:        return jsonify({'error''消息不能为空'}), 400    # 获取或创建会话历史    if session_id not in chat_history:        chat_history[session_id] = []    # 添加用户消息到历史    chat_history[session_id].append({        'role''user',        'content': message,        'timestamp': datetime.now().isoformat()    })    # 构建消息列表(包含历史记录)    messages = []    for msg in chat_history[session_id]:        messages.append({            'role': msg['role'],            'content': msg['content']        })    def generate():        """生成流式响应"""        try:            # 调用 OpenAI API(兼容 LMStudio)            response = openai.ChatCompletion.create(                model=config.get("model_name""local-model"),  # LMStudio 模型名称                messages=messages,                stream=True,                temperature=config.get("temperature"0.7),                max_tokens=config.get("max_tokens"2000)            )            full_response = ""            for chunk in response:                if hasattr(chunk, 'choices'and len(chunk.choices) > 0:                    delta = chunk.choices[0].delta                    if hasattr(delta, 'content'and delta.content:                        content = delta.content                        full_response += content                        # 发送流式数据                        yield f"data: {json.dumps({'content': content, 'done'False}, ensure_ascii=False)}\n\n"            # 添加助手回复到历史            chat_history[session_id].append({                'role''assistant',                'content': full_response,                'timestamp': datetime.now().isoformat()            })            # 发送完成信号            yield f"data: {json.dumps({'content''''done'True}, ensure_ascii=False)}\n\n"        except Exception as e:            error_msg = f"错误: {str(e)}"            yield f"data: {json.dumps({'error': error_msg, 'done'True}, ensure_ascii=False)}\n\n"    return Response(        stream_with_context(generate()),        mimetype='text/event-stream',        headers={            'Cache-Control''no-cache',            'X-Accel-Buffering''no'        }    )@app.route('/api/history', methods=['GET'])def get_history():    """获取聊天历史"""    session_id = request.args.get('session_id''default')    history = chat_history.get(session_id, [])    return jsonify({'history': history})@app.route('/api/clear', methods=['POST'])def clear_history():    """清空聊天历史"""    data = request.json    session_id = data.get('session_id''default')    if session_id in chat_history:        chat_history[session_id] = []    return jsonify({'success'True})if __name__ == '__main__':    print("=" * 50)    print("AI 助手服务器启动中...")    print(f"OpenAI API Base: {openai.api_base}")    print(f"模型名称: {config.get('model_name''local-model')}")    print(f"服务器地址: http://{config.get('flask_host''0.0.0.0')}:{config.get('flask_port'5000)}")    print("请确保 LMStudio 正在运行并监听 http://localhost:1234")    print("=" * 50)    app.run(        debug=config.get("flask_debug"True),        host=config.get("flask_host""0.0.0.0"),        port=config.get("flask_port"5000)    )

index.html,放在templates目录:

<!DOCTYPE html><htmllang="zh-CN"><head>    <metacharset="UTF-8">    <metaname="viewport"content="width=device-width, initial-scale=1.0">    <title>AI 大模型助手</title>    <style>        * {            margin0;            padding0;            box-sizing: border-box;        }        body {            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI''Microsoft YaHei', sans-serif;            backgroundlinear-gradient(135deg#667eea 0%#764ba2 100%);            height100vh;            display: flex;            justify-content: center;            align-items: center;            padding20px;        }        .container {            width100%;            max-width900px;            height90vh;            background: white;            border-radius20px;            box-shadow0 20px 60px rgba(0000.3);            display: flex;            flex-direction: column;            overflow: hidden;        }        .header {            backgroundlinear-gradient(135deg#667eea 0%#764ba2 100%);            color: white;            padding20px;            text-align: center;            box-shadow0 2px 10px rgba(0000.1);        }        .header h1 {            font-size24px;            margin-bottom5px;        }        .header p {            font-size14px;            opacity0.9;        }        .chat-container {            flex1;            overflow-y: auto;            padding20px;            background#f5f5f5;        }        .message {            margin-bottom20px;            display: flex;            animation: fadeIn 0.3s ease-in;        }        @keyframes fadeIn {            from {                opacity0;                transformtranslateY(10px);            }            to {                opacity1;                transformtranslateY(0);            }        }        .message.user {            justify-content: flex-end;        }        .message.assistant {            justify-content: flex-start;        }        .message-content {            max-width70%;            padding12px 16px;            border-radius18px;            word-wrap: break-word;            line-height1.5;        }        .message.user .message-content {            backgroundlinear-gradient(135deg#667eea 0%#764ba2 100%);            color: white;            border-bottom-right-radius4px;        }        .message.assistant .message-content {            background: white;            color#333;            border-bottom-left-radius4px;            box-shadow0 2px 8px rgba(0000.1);        }        .typing-indicator {            display: inline-block;            width8px;            height8px;            border-radius50%;            background#667eea;            margin-left4px;            animation: typing 1.4s infinite;        }        .typing-indicator:nth-child(2) {            animation-delay0.2s;        }        .typing-indicator:nth-child(3) {            animation-delay0.4s;        }        @keyframes typing {            0%60%100% {                transformtranslateY(0);                opacity0.7;            }            30% {                transformtranslateY(-10px);                opacity1;            }        }        .input-container {            padding20px;            background: white;            border-top1px solid #e0e0e0;            display: flex;            gap10px;        }        .input-wrapper {            flex1;            position: relative;        }        #messageInput {            width100%;            padding12px 16px;            border2px solid #e0e0e0;            border-radius25px;            font-size14px;            outline: none;            transition: border-color 0.3s;        }        #messageInput:focus {            border-color#667eea;        }        #sendButton {            padding12px 30px;            backgroundlinear-gradient(135deg#667eea 0%#764ba2 100%);            color: white;            border: none;            border-radius25px;            font-size14px;            cursor: pointer;            transition: transform 0.2s, box-shadow 0.2s;        }        #sendButton:hover:not(:disabled) {            transformtranslateY(-2px);            box-shadow0 5px 15px rgba(1021262340.4);        }        #sendButton:disabled {            opacity0.6;            cursor: not-allowed;        }        .clear-button {            padding8px 16px;            background#f5f5f5;            color#666;            border1px solid #e0e0e0;            border-radius20px;            font-size12px;            cursor: pointer;            transition: all 0.2s;        }        .clear-button:hover {            background#e0e0e0;        }        .status {            text-align: center;            padding10px;            font-size12px;            color#666;        }        .error {            background#fee;            color#c33;            padding12px;            border-radius8px;            margin10px 0;        }        /* 滚动条样式 */        .chat-container::-webkit-scrollbar {            width6px;        }        .chat-container::-webkit-scrollbar-track {            background#f1f1f1;        }        .chat-container::-webkit-scrollbar-thumb {            background#888;            border-radius3px;        }        .chat-container::-webkit-scrollbar-thumb:hover {            background#555;        }    </style></head><body>    <divclass="container">        <divclass="header">            <h1>🤖 AI 大模型助手</h1>            <p>基于 LMStudio 本地大模型 | 支持流式输出和上下文记忆</p>        </div>        <divclass="chat-container"id="chatContainer">            <divclass="message assistant">                <divclass="message-content">                    你好!我是 AI 助手,基于本地 LMStudio 大模型运行。我可以帮助你解答问题、进行对话。请开始提问吧!                </div>            </div>        </div>        <divclass="status"id="status">就绪</div>        <divclass="input-container">            <divclass="input-wrapper">                <input                    type="text"                     id="messageInput"                     placeholder="输入你的消息..."                     autocomplete="off"                >            </div>            <buttonid="sendButton">发送</button>            <buttonclass="clear-button"id="clearButton">清空</button>        </div>    </div>    <script>        const chatContainer = document.getElementById('chatContainer');        const messageInput = document.getElementById('messageInput');        const sendButton = document.getElementById('sendButton');        const clearButton = document.getElementById('clearButton');        const status = document.getElementById('status');        const sessionId = 'default';        // 发送消息        async function sendMessage() {            const message = messageInput.value.trim();            if (!message) return;            // 禁用输入和按钮            messageInput.disabled = true;            sendButton.disabled = true;            status.textContent = '正在思考...';            // 添加用户消息            addMessage('user', message);            messageInput.value = '';            // 创建助手消息容器            const assistantMessageDiv = addMessage('assistant''');            const assistantContent = assistantMessageDiv.querySelector('.message-content');            try {                // 发送请求到后端                const response = await fetch('/api/chat', {                    method'POST',                    headers: {                        'Content-Type''application/json',                    },                    bodyJSON.stringify({                        message: message,                        session_id: sessionId                    })                });                if (!response.ok) {                    throw new Error('请求失败');                }                // 处理流式响应                const reader = response.body.getReader();                const decoder = new TextDecoder();                let buffer = '';                while (true) {                    const { done, value } = await reader.read();                    if (done) break;                    buffer += decoder.decode(value, { streamtrue });                    const lines = buffer.split('\n');                    buffer = lines.pop(); // 保留最后一个不完整的行                    for (const line of lines) {                        if (line.startsWith('data: ')) {                            try {                                const data = JSON.parse(line.slice(6));                                if (data.error) {                                    assistantContent.innerHTML = `<span class="error">${data.error}</span>`;                                    break;                                }                                if (data.content) {                                    assistantContent.textContent += data.content;                                    scrollToBottom();                                }                                if (data.done) {                                    status.textContent = '就绪';                                    break;                                }                            } catch (e) {                                console.error('解析数据错误:', e);                            }                        }                    }                }            } catch (error) {                console.error('错误:', error);                assistantContent.innerHTML = `<span class="error">连接错误: ${error.message}</span>`;                status.textContent = '连接失败';            } finally {                // 恢复输入和按钮                messageInput.disabled = false;                sendButton.disabled = false;                messageInput.focus();            }        }        // 添加消息到聊天容器        function addMessage(role, content) {            const messageDiv = document.createElement('div');            messageDiv.className = `message ${role}`;            const contentDiv = document.createElement('div');            contentDiv.className = 'message-content';            contentDiv.textContent = content;            messageDiv.appendChild(contentDiv);            chatContainer.appendChild(messageDiv);            scrollToBottom();            return messageDiv;        }        // 滚动到底部        function scrollToBottom() {            chatContainer.scrollTop = chatContainer.scrollHeight;        }        // 清空聊天历史        async function clearHistory() {            if (!confirm('确定要清空聊天历史吗?')) return;            try {                const response = await fetch('/api/clear', {                    method'POST',                    headers: {                        'Content-Type''application/json',                    },                    bodyJSON.stringify({                        session_id: sessionId                    })                });                if (response.ok) {                    chatContainer.innerHTML = `                        <div class="message assistant">                            <div class="message-content">                                聊天历史已清空。请开始新的对话吧!                            </div>                        </div>                    `;                    status.textContent = '历史已清空';                }            } catch (error) {                console.error('清空历史错误:', error);                alert('清空历史失败');            }        }        // 事件监听        sendButton.addEventListener('click', sendMessage);        clearButton.addEventListener('click', clearHistory);        messageInput.addEventListener('keypress'(e) => {            if (e.key === 'Enter' && !e.shiftKey) {                e.preventDefault();                sendMessage();            }        });        // 页面加载时聚焦输入框        messageInput.focus();    </script></body></html>

config.json配置:

{    "openai_api_base": "http://localhost:1234/v1",    "openai_api_key": "lm-studio",    "model_name": "deepseek-r1-distill-qwen-1.5b",    "flask_host": "0.0.0.0",    "flask_port": 5009,    "flask_debug": false,    "temperature": 0.7,    "max_tokens": 2000}

高频避坑指南(重点!不用改代码,快速解决问题)

部署过程中,大概率会遇到以下5个问题,不用慌、不用改代码,按下面的方法,1分钟就能解决,适配上方备好的前后端代码:

1:后端启动失败,提示缺少依赖包

解决方法:重新按照软件环境准备步骤,安装requirements.txt里的依赖包;如果依然失败,卸载当前Python,重新安装3.9版本,再重新安装依赖。

2:启动后,前端页面显示连接失败或无法加载

解决方法:1. 确认后端启动窗口、LMStudio都没有关闭;2.  核对浏览器输入的地址,必须是http://localhost:5009(和配置文件一致);3.  关闭电脑防火墙,重新加载前端页面。

3:端口冲突,提示“port is already in use”

解决方法:无需改代码逻辑,打开backend文件夹下的config.json,找到“flask_port”参数(当前是5009),将其修改为未被占用的端口(比如80815001),保存后,重新启动后端服务,浏览器输入修改后的端口即可(比如http://localhost:8081)。

4:离线测试失败,断网后无法响应

解决方法:确认LMStudio已经加载好“deepseek-r1-distill-qwen-1.5b”模型;打开config.json,检查“openai_api_base”是否为http://localhost:1234/v1,确保没有修改成云端地址。

5:前端页面加载成功,但发送消息无响应

解决方法:1. 确认LMStudio正在监听http://localhost:1234,没有关闭;2.  检查后端启动窗口,是否有报错信息,如有,重启后端服务;3.  清空浏览器缓存,重新加载页面。

搭建完成后,这些实用玩法值得试(最大化利用)

不用改代码,就能解锁多种实用玩法,让你的本地AI助手,真正适配你的日常需求,比在线AI更实用、更贴心,还能借鉴当下主流AI的办事能力:

1. 隐私办公助手(高频实用)

处理敏感办公内容:写工作报告、润色邮件、翻译专业文档、整理会议纪要,所有内容都存储在本地,不用担心泄露;甚至可以上传本地办公文档,让AI帮你提炼重点、生成摘要,提升办公效率。

2. 本地知识库(自定义拓展)

将自己常用的资料(PDFWord、笔记、行业手册)上传到本地文件夹,通过简单配置(无需改代码,LMStudio内设置本地知识库路径),让AI助手读懂这些资料——后续提问时,AI会基于你的本地资料回答,相当于专属你的私人知识库,比如查询自己整理的笔记、行业知识点,不用再手动翻找。

3. 离线学习助手

断网状态下,让AI帮你讲解知识点、生成练习题、整理学习笔记,甚至可以自定义AI的讲解语气(比如通俗易懂”“专业严谨),适配你的学习节奏;适合学生、备考党,不用依赖网络,随时学习。

4. 私人生活管家

不用对接云端,就能让AI帮你规划日程、生成购物清单、写节日祝福、甚至规划出行路线,所有指令都在本地处理,隐私不泄露;还能自定义常用指令,比如输入今日日程AI就会弹出你提前设置的日程安排,贴合日常使用习惯。

最后想说:零代码也能玩转本地AI

很多人觉得搭建本地AI助手很难,其实只是缺一套现成的代码和详细的部署步骤——今天备好的前后端代码、配置文件,已经帮你省去了所有编程、调试的麻烦,你只需要跟着步骤复制代码、做好准备、点击启动30分钟就能落地。

相比于在线AI,本地AI助手的核心优势,从来都是隐私可控离线可用”——不用再担心敏感数据泄露,不用再依赖网络,哪怕出差、居家断网,也能随时调用AI,这才是最贴合普通人、上班族的AI使用方式。

赶紧复制上方代码,动手搭建属于自己的个人AI本地助手吧,解锁专属私人AI的快乐~

文末互动:你搭建过程中遇到了什么问题?成功落地后,你最想用它来做什么?评论区聊聊你的体验~

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-02-07 20:15:57 HTTP/2.0 GET : https://f.mffb.com.cn/a/470768.html
  2. 运行时间 : 0.113658s [ 吞吐率:8.80req/s ] 内存消耗:4,714.26kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=4b0286ea4b9776aacf867c0532acd0db
  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.000412s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.000607s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.000302s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000422s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000535s ]
  6. SELECT * FROM `set` [ RunTime:0.000713s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.000688s ]
  8. SELECT * FROM `article` WHERE `id` = 470768 LIMIT 1 [ RunTime:0.001541s ]
  9. UPDATE `article` SET `lasttime` = 1770466558 WHERE `id` = 470768 [ RunTime:0.004442s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 65 LIMIT 1 [ RunTime:0.000236s ]
  11. SELECT * FROM `article` WHERE `id` < 470768 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.002317s ]
  12. SELECT * FROM `article` WHERE `id` > 470768 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.001543s ]
  13. SELECT * FROM `article` WHERE `id` < 470768 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.011182s ]
  14. SELECT * FROM `article` WHERE `id` < 470768 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.008727s ]
  15. SELECT * FROM `article` WHERE `id` < 470768 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.010350s ]
0.116304s