当前位置:首页>java>关于谷歌的 Claude Code 编程助手是一个 200 行代码 Python

关于谷歌的 Claude Code 编程助手是一个 200 行代码 Python

  • 2026-01-20 18:32:40
关于谷歌的 Claude Code 编程助手是一个 200 行代码 Python

你好呀,我是可以拍砖的李茶德砖家。

给大家解读一篇有意思的海外文章,这篇文章想表达的核心是:AI 编码助手看起来像魔法,但其“代理(agent)”架构本质很朴素,用大约 **200 行左右的 Python** 就能搭一个可用的“编码代理”。后面有原文和链接。

核心比喻:一个极其聪明的“实习生”
您可以这样想象:Claude Code这类AI编程助手,本质上就是一个被关在“玻璃房”里的、超级聪明的实习生。
这个“玻璃房”就是互联网和您的电脑之间的屏障。实习生(AI大脑)能看到您、听到您的指令,也能思考,但它永远无法亲自伸手触碰您的电脑文件。它所有的“操作”,都必须通过向您“喊话”来完成。


工作流程:一场清晰的“对话循环”
整个工作过程,就是您和这位实习生之间一场结构化的对话:


1. 您下达指令:您在电脑前说:“帮我创建一个说‘你好世界’的新文件。”


2. 实习生思考并“喊话”:实习生听到后,它想:“要创建文件,我需要先看看当前文件夹里有什么,然后才能决定把新文件放哪。”于是它对着玻璃房外的您喊:“工具:查看文件夹(‘当前目录’)”。


3. 您(的程序)执行操作:您这边有一个忠诚的“秘书”(就是那大约200行的Python代码)。秘书听到喊话,立刻执行“查看当前文件夹”这个操作,然后把结果(比如“文件夹里有A.py和B.txt两个文件”)写在一张纸条上,贴回玻璃房。


4. 实习生继续工作:实习生看到纸条,获得了新信息。它接着思考:“好的,现在可以创建文件了。”于是它又喊:“工具:编辑文件(‘hello.py’, 旧内容:‘空’, 新内容:‘print(“Hello World!”)’)”。


5. 循环直到完成:秘书再次执行,创建文件。最后,实习生可能会告诉您:“文件‘hello.py’已创建成功,其中包含了您要的代码。”


看到了吗?整个“魔法”的核心,就是这个“喊话-执行-反馈”的循环。 实习生(AI)从未真正“碰到”您的电脑,它只是通过一套约定好的“喊话”格式(工具调用),指挥您这边的秘书(程序)来完成所有实际工作。

实习生的“三板斧”:它其实只会三件事
这篇文章指出,要让这样一个“实习生”帮您编程,它其实只需要三个最基本的“工具”指令,也就是“三板斧”:


1. 读文件:相当于“秘书,把XX文件的内容念给我听。”——让AI了解现有代码。


2. 列文件:相当于“秘书,当前这个文件夹里都有哪些东西?”——让AI浏览项目结构


3. 编辑文件:这是最重要的一招,它包含两个动作:


   * 创建/覆盖文件:相当于“秘书,新建一个文件,写上这些内容。”
   * 修改文件:相当于“秘书,在这个文件里,找到‘AAA’这句话,把它改成‘BBB’。”


像Claude Code这样的成熟产品,可能还有“搜索文件内容”、“运行简单命令”等更多工具,但这三个核心工具已经足以完成大量基础编程任务了。

为什么说“只有200行代码”?


那“200行Python代码”指的是什么呢?指的就是您这边那个“秘书”的工作手册!


这篇文章的作者亲自编写了这份“手册”,它大约200行,内容就是:


* 如何与Claude(那个“聪明的实习生”)对话。


* 如何识别实习生“喊话”的格式(比如"tool: edit_file(...)")


* 当听到“读文件”、“列文件”、“编辑文件”这三种特定喊话时,具体应该执行哪些对应的电脑操作(比如用Python打开文件、写入内容)。


* 如何把操作结果整理好,反馈给玻璃房里的实习生。


所以,复杂的、看似有“魔法”的AI编程体验,是建立在Claude等大模型本身强大的理解和推理能力之上的。而我们实现与它协作的“桥梁”或“秘书程序”,其核心逻辑可以非常简洁。

现实意义:揭开面纱,理解本质
这种解释对我们普通人有什么意义呢?


1. 破除神秘感:它让我们明白,AI工具不是无所不能的“黑魔法”,而是建立在可理解、相对简单的自动化流程之上的。它的强大,主要源于其“大脑”(大模型)的智能。


2. 理解其局限:正因为AI不能直接操作,一切依赖于“喊话”和“描述”,所以当任务非常复杂、需要精确操控时,它可能会出错或效率不高。它更像一个强大的辅助者,而非完全替代者。


3. 展望未来:现在,许多公司正在将这类“秘书程序”做得越来越强大和易用,集成到开发工具中,甚至让普通人通过对话就能生成整个应用。这正是一场由“聪明的实习生”加“高效的自动化秘书”共同推动的生产力革命。

原文内容和链接(有可能要科学上网):

https://www.mihaileric.com/The-Emperor-Has-No-Clothes/

The Emperor Has No Clothes: How to Code Claude Code in 200 Lines of Code

January 2025

emperor has no clothes

Today AI coding assistants feel like magic. You describe what you want in sometimes barely coherent English, and they read files, edit your project, and write functional code.

But here’s the thing: the core of these tools isn’t magic. It’s about 200 lines of straightforward Python.

Let’s build a functional coding agent from scratch.

The Mental Model

Before we write any code, let’s understand what’s actually happening when you use a coding agent. It’s essentially just a conversation with a powerful LLM that has a toolbox.

You send a message (“Create a new file with a hello world function”)

The LLM decides it needs a tool and responds with a structured tool call (or multiple tool calls)

Your program executes that tool call locally (actually creates the file)

The result gets sent back to the LLM

The LLM uses that context to continue or respond

That’s the whole loop. The LLM never actually touches your filesystem. It just asks for things to happen, and your code makes them happen.

Three Tools You Need

Our coding agent fundamentally needs three capabilities:

Read files so the LLM can see your code

List files so it can navigate your project

Edit files so it can give the directive to create and modify code

That’s it. Production agents like Claude Code have a few more capabilities including grep, bash, websearch, etc but for our purposes we’ll see that three tools is sufficient to do incredible things.

Setting Up the Scaffolding

We start with basic imports and an API client. I’m using OpenAI here, but this works with any LLM provider:

import inspect

import json

import os

import anthropic

from dotenv import load_dotenv

from pathlib import Path

from typing import Any, Dict, List, Tuple

load_dotenv()

claude_client = anthropic.Anthropic(api_key=os.environ["ANTHROPIC_API_KEY"])

Some terminal colors to make outputs readable:

YOU_COLOR = "\u001b[94m"

ASSISTANT_COLOR = "\u001b[93m"

RESET_COLOR = "\u001b[0m"

And a utility to resolve file paths (so file.py becomes /Users/you/project/file.py):

def resolve_abs_path(path_str: str) -> Path:

    """

    file.py -> /Users/you/project/file.py

    """

    path = Path(path_str).expanduser()

    if not path.is_absolute():

        path = (Path.cwd() / path).resolve()

    return path

Implementing the Tools

Note you should be detailed about your tool function docstrings as they will be used by the LLM to reason about what tools should be called during the conversation. More on this below.

Tool 1: Read File

The simplest tool. Take a filename, return its contents:

def read_file_tool(filename: str) -> Dict[str, Any]:

    """

    Gets the full content of a file provided by the user.

    :param filename: The name of the file to read.

    :return: The full content of the file.

    """

    full_path = resolve_abs_path(filename)

    print(full_path)

    with open(str(full_path), "r") as f:

        content = f.read()

    return {

        "file_path": str(full_path),

        "content": content

    }

We return a dictionary because the LLM needs structured context about what happened.

Tool 2: List Files

Navigate directories by listing their contents:

def list_files_tool(path: str) -> Dict[str, Any]:

    """

    Lists the files in a directory provided by the user.

    :param path: The path to a directory to list files from.

    :return: A list of files in the directory.

    """

    full_path = resolve_abs_path(path)

    all_files = []

    for item in full_path.iterdir():

        all_files.append({

            "filename": item.name,

            "type": "file" if item.is_file() else "dir"

        })

    return {

        "path": str(full_path),

        "files": all_files

    }

Tool 3: Edit File

This is the most complex tool, but still straightforward. It handles two cases:

Creating a new file when old_str is empty

Replacing text by finding old_str and replacing with new_str

def edit_file_tool(path: str, old_str: str, new_str: str) -> Dict[str, Any]:

    """

    Replaces first occurrence of old_str with new_str in file. If old_str is empty,

    create/overwrite file with new_str.

    :param path: The path to the file to edit.

    :param old_str: The string to replace.

    :param new_str: The string to replace with.

    :return: A dictionary with the path to the file and the action taken.

    """

    full_path = resolve_abs_path(path)

    if old_str == "":

        full_path.write_text(new_str, encoding="utf-8")

        return {

            "path": str(full_path),

            "action": "created_file"

        }

    original = full_path.read_text(encoding="utf-8")

    if original.find(old_str) == -1:

        return {

            "path": str(full_path),

            "action": "old_str not found"

        }

    edited = original.replace(old_str, new_str, 1)

    full_path.write_text(edited, encoding="utf-8")

    return {

        "path": str(full_path),

        "action": "edited"

    }

The convention here: empty old_str means “create this file.” Otherwise, find and replace. Real IDEs add sophisticated fallback behavior when the string isn’t found, but this works.

The Tool Registry

We need a way to look up tools by name:

TOOL_REGISTRY = {

    "read_file": read_file_tool,

    "list_files": list_files_tool,

    "edit_file": edit_file_tool 

}

Teaching the LLM About Our Tools

The LLM needs to know what tools exist and how to call them. We generate this dynamically from our function signatures and docstrings:

def get_tool_str_representation(tool_name: str) -> str:

    tool = TOOL_REGISTRY[tool_name]

    return f"""

    Name: {tool_name}

    Description: {tool.__doc__}

    Signature: {inspect.signature(tool)}

    """

def get_full_system_prompt():

    tool_str_repr = ""

    for tool_name in TOOL_REGISTRY:

        tool_str_repr += "TOOL\n===" + get_tool_str_representation(tool_name)

        tool_str_repr += f"\n{'='*15}\n"

    return SYSTEM_PROMPT.format(tool_list_repr=tool_str_repr)

And the system prompt itself:

SYSTEM_PROMPT = """

You are a coding assistant whose goal it is to help us solve coding tasks. 

You have access to a series of tools you can execute. Here are the tools you can execute:

{tool_list_repr}

When you want to use a tool, reply with exactly one line in the format: 'tool: TOOL_NAME({{JSON_ARGS}})' and nothing else.

Use compact single-line JSON with double quotes. After receiving a tool_result(...) message, continue the task.

If no tool is needed, respond normally.

"""

This is the key insight: we’re just telling the LLM “here are your tools, here’s the format to call them.” The LLM figures out when and how to use them.

Parsing Tool Calls

When the LLM responds, we need to detect if it’s asking us to run a tool:

def extract_tool_invocations(text: str) -> List[Tuple[str, Dict[str, Any]]]:

    """

    Return list of (tool_name, args) requested in 'tool: name({...})' lines.

    The parser expects single-line, compact JSON in parentheses.

    """

    invocations = []

    for raw_line in text.splitlines():

        line = raw_line.strip()

        if not line.startswith("tool:"):

            continue

        try:

            after = line[len("tool:"):].strip()

            name, rest = after.split("(", 1)

            name = name.strip()

            if not rest.endswith(")"):

                continue

            json_str = rest[:-1].strip()

            args = json.loads(json_str)

            invocations.append((name, args))

        except Exception:

            continue

    return invocations

Simple text parsing. Look for lines starting with tool:, extract the function name and JSON arguments.

The LLM Call

A thin wrapper around the API:

def execute_llm_call(conversation: List[Dict[str, str]]):

    system_content = ""

    messages = []

    for msg in conversation:

        if msg["role"] == "system":

            system_content = msg["content"]

        else:

            messages.append(msg)

    response = claude_client.messages.create(

        model="claude-sonnet-4-20250514",

        max_tokens=2000,

        system=system_content,

        messages=messages

    )

    return response.content[0].text

The Agent Loop

Now we put it all together. This is where the “magic” happens:

def run_coding_agent_loop():

    print(get_full_system_prompt())

    conversation = [{

        "role": "system",

        "content": get_full_system_prompt()

    }]

    while True:

        try:

            user_input = input(f"{YOU_COLOR}You:{RESET_COLOR}:")

        except (KeyboardInterrupt, EOFError):

            break

        conversation.append({

            "role": "user",

            "content": user_input.strip()

        })

        while True:

            assistant_response = execute_llm_call(conversation)

            tool_invocations = extract_tool_invocations(assistant_response)

            if not tool_invocations:

                print(f"{ASSISTANT_COLOR}Assistant:{RESET_COLOR}: {assistant_response}")

                conversation.append({

                    "role": "assistant",

                    "content": assistant_response

                })

                break

            for name, args in tool_invocations:

                tool = TOOL_REGISTRY[name]

                resp = ""

                print(name, args)

                if name == "read_file":

                    resp = tool(args.get("filename", "."))

                elif name == "list_files":

                    resp = tool(args.get("path", "."))

                elif name == "edit_file":

                    resp = tool(args.get("path", "."), 

                                args.get("old_str", ""), 

                                args.get("new_str", ""))

                conversation.append({

                    "role": "user",

                    "content": f"tool_result({json.dumps(resp)})"

                })

The structure:

Outer loop: Get user input, add to conversation

Inner loop: Call LLM, check for tool invocations

If no tools needed, print response and break inner loop

If tools needed, execute them, add results to conversation, loop again

The inner loop continues until the LLM responds without requesting any tools. This lets the agent chain multiple tool calls (read a file, then edit it, then confirm the edit).

Running It

if __name__ == "__main__":

    run_coding_agent_loop()

Now you can have conversations like:

You: Make me a new file called hello.py and implement hello world in it

Agent calls edit_file with path=“hello.py”, old_str="", new_str=“print(‘Hello World’)”

Assistant: Done! Created hello.py with a hello world implementation.

Or multi-step interactions:

You: Edit hello.py and add a function for multiplying two numbers

Agent calls read_file to see current contents. Agent calls edit_file to add the function.

Assistant: Added a multiply function to hello.py.

What We Built vs. Production Tools

This is about 200 lines. Production tools like Claude Code add:

Better error handling and fallback behaviors

Streaming responses for better UX

Smarter context management (summarizing long files, etc.)

More tools (run commands, search codebase, etc.)

Approval workflows for destructive operations

But the core loop? It’s exactly what we built here. The LLM decides what to do, your code executes it, results flow back. That’s the whole architecture.

Try It Yourself

The full source is about 200 lines. Swap in your preferred LLM provider, adjust the system prompt, add more tools as an exercise. You’ll be surprised how capable this simple pattern is.

This is part of the first module in my modern AI software engineering course based on my Stanford lectures. Check it out here.

pythonaillmcoding-agentstutorial

Like what you read? I would love to hear from you! 🙂

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-02-08 09:20:38 HTTP/2.0 GET : https://f.mffb.com.cn/a/465649.html
  2. 运行时间 : 0.119851s [ 吞吐率:8.34req/s ] 内存消耗:4,901.70kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=2990f1769ddfb2d0b245007918612d8e
  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.000647s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.000835s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.000312s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.001971s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000726s ]
  6. SELECT * FROM `set` [ RunTime:0.000350s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.000759s ]
  8. SELECT * FROM `article` WHERE `id` = 465649 LIMIT 1 [ RunTime:0.001244s ]
  9. UPDATE `article` SET `lasttime` = 1770513639 WHERE `id` = 465649 [ RunTime:0.001282s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 65 LIMIT 1 [ RunTime:0.006484s ]
  11. SELECT * FROM `article` WHERE `id` < 465649 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.006319s ]
  12. SELECT * FROM `article` WHERE `id` > 465649 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.001280s ]
  13. SELECT * FROM `article` WHERE `id` < 465649 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.007595s ]
  14. SELECT * FROM `article` WHERE `id` < 465649 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.005049s ]
  15. SELECT * FROM `article` WHERE `id` < 465649 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.013178s ]
0.121326s