乐于分享
好东西不私藏

QwenPaw源码解析系列(七):配置系统与工作目录架构

QwenPaw源码解析系列(七):配置系统与工作目录架构

前言

配置系统是QwenPaw灵活性的基础,支持用户自定义模型、渠道、记忆等各个方面。本篇文章将深入解析QwenPaw的配置系统设计。

配置系统架构

QwenPaw的配置系统采用分层设计:

┌─────────────────────────────────────────────────────┐
│ 配置层级 │
├─────────────────────────────────────────────────────┤
│ Level 1: 全局配置 (config.yaml) │
│ Level 2: Agent配置 (agent_profile.yaml) │
│ Level 3: 环境变量 (.env / working.secret) │
│ Level 4: 运行时覆盖 (CLI参数) │
└─────────────────────────────────────────────────────┘

AgentProfileConfig:智能体配置

配置结构

@dataclass
class AgentProfileConfig:
"""智能体配置文件"""

id: str # 智能体唯一标识
name: str # 智能体名称

# 模型配置
active_model: ModelConfig # 当前使用的模型
available_models: list[ModelConfig] # 可用模型列表

# 运行配置
running: RunningConfig # 运行参数
language: str = "zh" # 语言设置

# 工具配置
tools: ToolsConfig | None = None # 工具启用状态

# 安全配置
security: SecurityConfig | None = None # 安全设置

# 渠道配置
channels: list[str] = field(default_factory=list) # 启用的渠道

# 记忆配置
memory: MemoryConfig | None = None # 记忆配置

# 心跳配置
heartbeat: HeartbeatConfig | None = None # 心跳设置

子配置详解

@dataclass
class RunningConfig:
"""运行配置"""
max_iters: int = 20 # 最大迭代次数
max_input_length: int = 8000 # 最大输入长度
memory_compact_threshold: float = 0.8 # 记忆压缩阈值
auto_continue_on_text_only: bool = True # 自动继续
shell_command_timeout: float = 30.0 # Shell超时时间

@dataclass
class ModelConfig:
"""模型配置"""
provider_id: str # 提供商ID (如 "openai", "dashscope")
model: str # 模型名称 (如 "gpt-4", "qwen-max")
api_key: str | None = None # API密钥
base_url: str | None = None # 自定义API地址
temperature: float = 0.7 # 温度参数
max_tokens: int = 4096 # 最大token数

@dataclass
class ToolsConfig:
"""工具配置"""
builtin_tools: dict[str, ToolSetting] # 内置工具设置

@dataclass
class ToolSetting:
"""工具设置"""
enabled: bool = True # 是否启用
async_execution: bool = False # 是否支持异步执行

配置加载流程

工作目录结构

~/.qwenpaw/
├── config.yaml # 全局配置
├── agents/ # 智能体配置
│ ├── default.yaml # 默认智能体
│ └── assistant.yaml # 自定义智能体
├── channels/ # 渠道配置
│ ├── dingtalk.yaml
│ ├── feishu.yaml
│ └── discord.yaml
├── memories/ # 记忆存储
├── skills/ # 技能目录
├── skills_config.yaml # 技能启用配置
├── .secret # 敏感信息(API密钥等)
└── .secret.backups/ # 备份

配置加载器

class ConfigLoader:
"""配置加载器"""

def __init__(self, working_dir: Path):
self.working_dir = working_dir
self.config_dir = working_dir / "config"
self.secrets_file = working_dir / ".secret"

async def load_agent_config(self, agent_id: str) -> AgentProfileConfig:
"""加载智能体配置"""
config_file = self.config_dir / "agents" / f"{agent_id}.yaml"

if not config_file.exists():
# 加载默认配置
config_file = self.config_dir / "agents" / "default.yaml"

# 读取配置
config_dict = yaml.safe_load(config_file.read_text())

# 合并Secrets
secrets = self._load_secrets()
config_dict = self._merge_secrets(config_dict, secrets)

# 验证配置
return self._validate_and_parse(config_dict)

def _load_secrets(self) -> dict:
"""加载敏感信息"""
if not self.secrets_file.exists():
return {}

# .secret文件支持多格式
if self.secrets_file.suffix == ".json":
return json.loads(self.secrets_file.read_text())
elif self.secrets_file.suffix in [".env", ""]:
return self._parse_env_file(self.secrets_file.read_text())
else:
return {}

环境变量管理

.env文件解析

class EnvManager:
"""环境变量管理器"""

def __init__(self, secrets_file: Path):
self.secrets_file = secrets_file
self.envs: dict[str, str] = {}
self._load()

def _load(self) -> None:
"""加载环境变量"""
if not self.secrets_file.exists():
return

content = self.secrets_file.read_text()
for line in content.splitlines():
line = line.strip()

# 跳过注释和空行
if not line or line.startswith("#"):
continue

# 解析 KEY=VALUE
if "=" in line:
key, value = line.split("=", 1)
key = key.strip()
value = value.strip()

# 支持引号
if value.startswith('"') and value.endswith('"'):
value = value[1:-1]
elif value.startswith("'") and value.endswith("'"):
value = value[1:-1]

self.envs[key] = value

def get(self, key: str, default: str | None = None) -> str | None:
"""获取环境变量"""
return self.envs.get(key, default)

def set(self, key: str, value: str) -> None:
"""设置环境变量"""
self.envs[key] = value
self._save()

def _save(self) -> None:
"""保存环境变量"""
lines = [f"{k}={v}" for k, v in self.envs.items()]
self.secrets_file.write_text("\n".join(lines))

环境变量加载到进程

# envs.py
def load_envs_into_environ() -> None:
"""将持久化的环境变量加载到os.environ"""
# 获取工作目录
working_dir = os.environ.get("QWENPAW_WORKING_DIR")
if not working_dir:
return

secrets_file = Path(working_dir) / ".secret"
if not secrets_file.exists():
return

# 解析.env格式
if secrets_file.suffix == ".env" or not secrets_file.suffix:
content = secrets_file.read_text()
for line in content.splitlines():
line = line.strip()
if not line or line.startswith("#"):
continue
if "=" in line:
key, value = line.split("=", 1)
key = key.strip()
value = value.strip().strip('"').strip("'")
os.environ[key] = value

配置验证

Pydantic验证

from pydantic import BaseModel, validator, Field

class AgentProfileConfig(BaseModel):
"""使用Pydantic验证的智能体配置"""

id: str = Field(..., min_length=1, max_length=100)
name: str = Field(..., min_length=1, max_length=50)

# 模型配置
active_model: ModelConfig

# 运行配置
running: RunningConfig = Field(default_factory=RunningConfig)

@validator("id")
def validate_id(cls, v):
"""验证ID格式"""
if not re.match(r"^[a-zA-Z0-9_-]+$", v):
raise ValueError(
"Agent ID must contain only alphanumeric characters, "
"underscores, and hyphens"
)
return v

@validator("running")
def validate_running(cls, v):
"""验证运行配置"""
if v.max_iters <= 0:
raise ValueError("max_iters must be positive")
if v.max_iters > 100:
raise ValueError("max_iters cannot exceed 100")
return v

class ModelConfig(BaseModel):
"""模型配置验证"""

provider_id: str
model: str

@validator("provider_id")
def validate_provider(cls, v):
"""验证提供商"""
valid_providers = ["openai", "dashscope", "anthropic", "gemini"]
if v not in valid_providers:
raise ValueError(
f"Invalid provider: {v}. "
f"Valid providers: {valid_providers}"
)
return v

渠道配置

@dataclass
class ChannelConfig:
"""渠道配置基类"""
channel_id: str
enabled: bool = True
name: str = ""

@dataclass
class DingTalkConfig(ChannelConfig):
"""钉钉配置"""
app_key: str = ""
app_secret: str = ""
agent_id: str = ""
webhook_url: str | None = None

@dataclass
class FeishuConfig(ChannelConfig):
"""飞书配置"""
app_id: str = ""
app_secret: str = ""
bot_id: str = ""

@dataclass
class DiscordConfig(ChannelConfig):
"""Discord配置"""
bot_token: str = ""
guild_id: str = ""
channel_ids: list[str] = field(default_factory=list)

渠道加载器

class ChannelConfigLoader:
"""渠道配置加载器"""

def __init__(self, working_dir: Path):
self.working_dir = working_dir
self.channel_dir = working_dir / "channels"

async def load_all_channels(self) -> dict[str, ChannelConfig]:
"""加载所有渠道配置"""
channels = {}

for config_file in self.channel_dir.glob("*.yaml"):
channel_type = config_file.stem

try:
config = await self._load_channel_config(channel_type, config_file)
channels[channel_type] = config
except Exception as e:
logger.warning(f"Failed to load channel {channel_type}: {e}")

return channels

async def _load_channel_config(
self,
channel_type: str,
config_file: Path,
) -> ChannelConfig:
"""加载单个渠道配置"""
config_dict = yaml.safe_load(config_file.read_text())

# 根据渠道类型创建配置对象
if channel_type == "dingtalk":
return DingTalkConfig(**config_dict)
elif channel_type == "feishu":
return FeishuConfig(**config_dict)
elif channel_type == "discord":
return DiscordConfig(**config_dict)
else:
return ChannelConfig(**config_dict)

配置热更新

class ConfigWatcher:
"""配置文件监视器,支持热更新"""

def __init__(self, working_dir: Path):
self.working_dir = working_dir
self._watchers: dict[Path, asyncio.Task] = {}
self._callbacks: dict[str, Callable] = {}

async def watch(
self,
config_path: Path,
callback: Callable,
) -> None:
"""监视配置文件变化"""
async with aiofiles.watch(config_path) as changes:
self._callbacks[str(config_path)] = callback

async for change in changes:
if change.type == "modified":
logger.info(f"Config file changed: {config_path}")
await self._handle_change(config_path)

async def _handle_change(self, config_path: Path) -> None:
"""处理配置变化"""
callback = self._callbacks.get(str(config_path))
if not callback:
return

try:
# 重新加载配置
new_config = self._load_config(config_path)

# 触发回调
await callback(new_config)
except Exception as e:
logger.error(f"Failed to handle config change: {e}")

配置备份与恢复

class ConfigBackupManager:
"""配置备份管理器"""

def __init__(self, working_dir: Path):
self.working_dir = working_dir
self.backup_dir = working_dir / ".secret.backups"

async def create_backup(self, description: str = "") -> str:
"""创建配置备份"""
if not self.backup_dir.exists():
self.backup_dir.mkdir(parents=True)

timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")
backup_name = f"backup_{timestamp}"
backup_path = self.backup_dir / backup_name

# 复制配置文件
shutil.copytree(self.working_dir / ".secret", backup_path)

# 记录备份元数据
metadata = {
"timestamp": timestamp,
"description": description,
"files": list(self.backup_dir.iterdir()),
}

metadata_file = backup_path / "metadata.json"
metadata_file.write_text(json.dumps(metadata, indent=2))

return backup_name

async def restore_backup(self, backup_name: str) -> None:
"""恢复配置备份"""
backup_path = self.backup_dir / backup_name

if not backup_path.exists():
raise ValueError(f"Backup not found: {backup_name}")

# 备份当前配置
await self.create_backup("Auto-backup before restore")

# 恢复配置
current_secret = self.working_dir / ".secret"
if current_secret.exists():
shutil.rmtree(current_secret)
shutil.copytree(backup_path, current_secret)

logger.info(f"Restored backup: {backup_name}")

多智能体配置

@dataclass
class MultiAgentConfig:
"""多智能体配置"""

agents: list[AgentProfileConfig] # 智能体列表
collaboration: CollaborationConfig # 协作配置

@classmethod
def from_directory(cls, config_dir: Path) -> "MultiAgentConfig":
"""从目录加载多智能体配置"""
agents = []

for config_file in config_dir.glob("agents/*.yaml"):
agent_config = cls._load_agent_config(config_file)
agents.append(agent_config)

collaboration_file = config_dir / "collaboration.yaml"
if collaboration_file.exists():
collaboration = cls._load_collaboration_config(collaboration_file)
else:
collaboration = CollaborationConfig()

return cls(agents=agents, collaboration=collaboration)

@dataclass
class CollaborationConfig:
"""智能体协作配置"""
enabled: bool = True
protocols: list[str] = field(default_factory=lambda: ["acp"])
max_concurrent_tasks: int = 5

总结

QwenPaw的配置系统设计原则:

1.
分层管理:全局、Agent、运行时多层次配置
2.
安全存储:敏感信息(API密钥)与配置分离
3.
灵活扩展:支持多种渠道和模型
4.
热更新:配置变更无需重启
5.
可备份:配置版本管理和快速恢复

通过这套配置系统,QwenPaw能够适应不同的使用场景和用户需求。


往期回顾:

系列一:项目概览与整体架构
系列二:QwenPawAgent核心实现
系列三:记忆系统设计与实现
系列四:Skills系统与扩展机制
系列五:ACP协议与多智能体通信
系列六:安全防护体系深度解析

下期预告:

控制台:Web界面与API
部署与扩展:Docker与云端部署
总结与展望

如果对你有帮助,欢迎点赞在看

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-05-09 06:49:00 HTTP/1.1 GET : https://www.yeyulingfeng.com/a/585487.html
  2. 运行时间 : 0.140419s [ 吞吐率:7.12req/s ] 内存消耗:4,840.83kb 文件加载:145
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=8d0b494ad057eb1f42d40a4f9aa187fc
  1. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/public/index.php ( 0.79 KB )
  2. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/autoload.php ( 0.17 KB )
  3. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/composer/autoload_real.php ( 2.49 KB )
  4. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/composer/platform_check.php ( 0.90 KB )
  5. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/composer/ClassLoader.php ( 14.03 KB )
  6. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/composer/autoload_static.php ( 6.05 KB )
  7. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-helper/src/helper.php ( 8.34 KB )
  8. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-validate/src/helper.php ( 2.19 KB )
  9. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/ralouphie/getallheaders/src/getallheaders.php ( 1.60 KB )
  10. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/helper.php ( 1.47 KB )
  11. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/stubs/load_stubs.php ( 0.16 KB )
  12. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Exception.php ( 1.69 KB )
  13. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-container/src/Facade.php ( 2.71 KB )
  14. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/symfony/deprecation-contracts/function.php ( 0.99 KB )
  15. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/symfony/polyfill-mbstring/bootstrap.php ( 8.26 KB )
  16. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/symfony/polyfill-mbstring/bootstrap80.php ( 9.78 KB )
  17. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/symfony/var-dumper/Resources/functions/dump.php ( 1.49 KB )
  18. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-dumper/src/helper.php ( 0.18 KB )
  19. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/symfony/var-dumper/VarDumper.php ( 4.30 KB )
  20. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/guzzlehttp/guzzle/src/functions_include.php ( 0.16 KB )
  21. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/guzzlehttp/guzzle/src/functions.php ( 5.54 KB )
  22. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/App.php ( 15.30 KB )
  23. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-container/src/Container.php ( 15.76 KB )
  24. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/psr/container/src/ContainerInterface.php ( 1.02 KB )
  25. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/provider.php ( 0.19 KB )
  26. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Http.php ( 6.04 KB )
  27. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-helper/src/helper/Str.php ( 7.29 KB )
  28. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Env.php ( 4.68 KB )
  29. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/common.php ( 0.03 KB )
  30. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/helper.php ( 18.78 KB )
  31. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Config.php ( 5.54 KB )
  32. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/alipay.php ( 3.59 KB )
  33. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/facade/Env.php ( 1.67 KB )
  34. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/app.php ( 0.95 KB )
  35. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/cache.php ( 0.78 KB )
  36. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/console.php ( 0.23 KB )
  37. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/cookie.php ( 0.56 KB )
  38. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/database.php ( 2.48 KB )
  39. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/filesystem.php ( 0.61 KB )
  40. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/lang.php ( 0.91 KB )
  41. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/log.php ( 1.35 KB )
  42. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/middleware.php ( 0.19 KB )
  43. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/route.php ( 1.89 KB )
  44. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/session.php ( 0.57 KB )
  45. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/trace.php ( 0.34 KB )
  46. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/view.php ( 0.82 KB )
  47. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/event.php ( 0.25 KB )
  48. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Event.php ( 7.67 KB )
  49. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/service.php ( 0.13 KB )
  50. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/AppService.php ( 0.26 KB )
  51. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Service.php ( 1.64 KB )
  52. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Lang.php ( 7.35 KB )
  53. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/lang/zh-cn.php ( 13.70 KB )
  54. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/initializer/Error.php ( 3.31 KB )
  55. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/initializer/RegisterService.php ( 1.33 KB )
  56. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/services.php ( 0.14 KB )
  57. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/service/PaginatorService.php ( 1.52 KB )
  58. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/service/ValidateService.php ( 0.99 KB )
  59. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/service/ModelService.php ( 2.04 KB )
  60. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-trace/src/Service.php ( 0.77 KB )
  61. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Middleware.php ( 6.72 KB )
  62. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/initializer/BootService.php ( 0.77 KB )
  63. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/Paginator.php ( 11.86 KB )
  64. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-validate/src/Validate.php ( 63.20 KB )
  65. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/Model.php ( 23.55 KB )
  66. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/concern/Attribute.php ( 21.05 KB )
  67. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/concern/AutoWriteData.php ( 4.21 KB )
  68. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/concern/Conversion.php ( 6.44 KB )
  69. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/concern/DbConnect.php ( 5.16 KB )
  70. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/concern/ModelEvent.php ( 2.33 KB )
  71. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/concern/RelationShip.php ( 28.29 KB )
  72. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-helper/src/contract/Arrayable.php ( 0.09 KB )
  73. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-helper/src/contract/Jsonable.php ( 0.13 KB )
  74. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/contract/Modelable.php ( 0.09 KB )
  75. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Db.php ( 2.88 KB )
  76. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/DbManager.php ( 8.52 KB )
  77. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Log.php ( 6.28 KB )
  78. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Manager.php ( 3.92 KB )
  79. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/psr/log/src/LoggerTrait.php ( 2.69 KB )
  80. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/psr/log/src/LoggerInterface.php ( 2.71 KB )
  81. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Cache.php ( 4.92 KB )
  82. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/psr/simple-cache/src/CacheInterface.php ( 4.71 KB )
  83. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-helper/src/helper/Arr.php ( 16.63 KB )
  84. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/cache/driver/File.php ( 7.84 KB )
  85. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/cache/Driver.php ( 9.03 KB )
  86. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/contract/CacheHandlerInterface.php ( 1.99 KB )
  87. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/Request.php ( 0.09 KB )
  88. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Request.php ( 55.78 KB )
  89. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/middleware.php ( 0.25 KB )
  90. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Pipeline.php ( 2.61 KB )
  91. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-trace/src/TraceDebug.php ( 3.40 KB )
  92. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/middleware/SessionInit.php ( 1.94 KB )
  93. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Session.php ( 1.80 KB )
  94. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/session/driver/File.php ( 6.27 KB )
  95. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/contract/SessionHandlerInterface.php ( 0.87 KB )
  96. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/session/Store.php ( 7.12 KB )
  97. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Route.php ( 23.73 KB )
  98. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/RuleName.php ( 5.75 KB )
  99. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/Domain.php ( 2.53 KB )
  100. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/RuleGroup.php ( 22.43 KB )
  101. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/Rule.php ( 26.95 KB )
  102. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/RuleItem.php ( 9.78 KB )
  103. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/route/app.php ( 3.94 KB )
  104. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/facade/Route.php ( 4.70 KB )
  105. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/dispatch/Controller.php ( 4.74 KB )
  106. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/Dispatch.php ( 10.44 KB )
  107. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/controller/Index.php ( 9.87 KB )
  108. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/BaseController.php ( 2.05 KB )
  109. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/facade/Db.php ( 0.93 KB )
  110. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/connector/Mysql.php ( 5.44 KB )
  111. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/PDOConnection.php ( 52.47 KB )
  112. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/Connection.php ( 8.39 KB )
  113. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/ConnectionInterface.php ( 4.57 KB )
  114. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/builder/Mysql.php ( 16.58 KB )
  115. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/Builder.php ( 24.06 KB )
  116. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/BaseBuilder.php ( 27.50 KB )
  117. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/Query.php ( 15.71 KB )
  118. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/BaseQuery.php ( 45.13 KB )
  119. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/TimeFieldQuery.php ( 7.43 KB )
  120. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/AggregateQuery.php ( 3.26 KB )
  121. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/ModelRelationQuery.php ( 20.07 KB )
  122. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/ParamsBind.php ( 3.66 KB )
  123. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/ResultOperation.php ( 7.01 KB )
  124. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/WhereQuery.php ( 19.37 KB )
  125. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/JoinAndViewQuery.php ( 7.11 KB )
  126. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/TableFieldInfo.php ( 2.63 KB )
  127. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/Transaction.php ( 2.77 KB )
  128. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/log/driver/File.php ( 5.96 KB )
  129. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/contract/LogHandlerInterface.php ( 0.86 KB )
  130. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/log/Channel.php ( 3.89 KB )
  131. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/event/LogRecord.php ( 1.02 KB )
  132. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-helper/src/Collection.php ( 16.47 KB )
  133. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/facade/View.php ( 1.70 KB )
  134. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/View.php ( 4.39 KB )
  135. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/controller/Es.php ( 3.30 KB )
  136. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Response.php ( 8.81 KB )
  137. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/response/View.php ( 3.29 KB )
  138. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Cookie.php ( 6.06 KB )
  139. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-view/src/Think.php ( 8.38 KB )
  140. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/contract/TemplateHandlerInterface.php ( 1.60 KB )
  141. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-template/src/Template.php ( 46.61 KB )
  142. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-template/src/template/driver/File.php ( 2.41 KB )
  143. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-template/src/template/contract/DriverInterface.php ( 0.86 KB )
  144. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/runtime/temp/c935550e3e8a3a4c27dd94e439343fdf.php ( 31.50 KB )
  145. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-trace/src/Html.php ( 4.42 KB )
  1. CONNECT:[ UseTime:0.000609s ] mysql:host=127.0.0.1;port=3306;dbname=wenku;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.000721s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.000343s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000287s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000579s ]
  6. SELECT * FROM `set` [ RunTime:0.002630s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.000631s ]
  8. SELECT * FROM `article` WHERE `id` = 585487 LIMIT 1 [ RunTime:0.000506s ]
  9. UPDATE `article` SET `lasttime` = 1778280540 WHERE `id` = 585487 [ RunTime:0.005115s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 64 LIMIT 1 [ RunTime:0.000255s ]
  11. SELECT * FROM `article` WHERE `id` < 585487 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.000461s ]
  12. SELECT * FROM `article` WHERE `id` > 585487 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.001657s ]
  13. SELECT * FROM `article` WHERE `id` < 585487 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.000741s ]
  14. SELECT * FROM `article` WHERE `id` < 585487 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.000785s ]
  15. SELECT * FROM `article` WHERE `id` < 585487 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.002145s ]
0.142035s