乐于分享
好东西不私藏

OpenClaw 30 天系列 - Day 23:安全加固:权限管理、敏感信息保护、审计日志

OpenClaw 30 天系列 - Day 23:安全加固:权限管理、敏感信息保护、审计日志

🎯 学习目标:学会安全加固:权限管理、敏感信息保护、审计日志

⏱️ 阅读时间:约 12 分钟

 💡 前置要求:无


🔐 安全三要素

核心方向总览

方向
说明
防护目标
权限管理
控制谁能访问什么
防止未授权访问
敏感信息保护
加密和脱敏处理
防止数据泄露
审计日志
记录所有操作
追溯和问责

👥 权限管理

基于角色的访问控制(RBAC)

const roles = {admin: {name'管理员',permissions: ['*'],  // 所有权限description'系统管理员,拥有全部权限'  },manager: {name'经理',permissions: ['read:*','write:documents','write:tasks','execute:skills','manage:team'    ],description'团队经理,可以管理团队和查看文档'  },developer: {name'开发者',permissions: ['read:documents','write:code','execute:dev-skills','read:logs'    ],description'开发者,可以编写代码和执行开发相关技能'  },viewer: {name'观察者',permissions: ['read:public-documents'    ],description'只读用户,只能查看公开文档'  }};classPermissionManager {asynccheckPermission(userId, requiredPermission) {const user = awaitgetUser(userId);const role = roles[user.role];// 管理员拥有所有权限if (role.permissions.includes('*')) {returntrue;    }// 检查具体权限return role.permissions.some(permission => {// 通配符匹配if (permission.endsWith(':*')) {const prefix = permission.slice(0, -1);return requiredPermission.startsWith(prefix);      }// 精确匹配return permission === requiredPermission;    });  }asyncrequirePermission(userId, requiredPermission, action) {const hasPermission = awaitthis.checkPermission(userId, requiredPermission);if (!hasPermission) {// 记录未授权访问尝试awaitlogSecurityEvent({type'unauthorized_access',        userId,        requiredPermission,        action,timestampnewDate()      });thrownewError(`权限不足:需要 ${requiredPermission}`);    }  }}

技能权限控制

const skillPermissions = {// 高风险技能'exec': {requiredPermission'execute:shell',riskLevel'high',requireConfirmationtrue  },'file-write': {requiredPermission'write:files',riskLevel'medium',requireConfirmationfalse  },'file-delete': {requiredPermission'write:files',riskLevel'high',requireConfirmationtrue  },// 中等风险技能'browser': {requiredPermission'execute:browser',riskLevel'medium',requireConfirmationfalse  },'feishu-message': {requiredPermission'write:messages',riskLevel'medium',requireConfirmationfalse  },// 低风险技能'web-search': {requiredPermission'read:web',riskLevel'low',requireConfirmationfalse  },'read-file': {requiredPermission'read:files',riskLevel'low',requireConfirmationfalse  }};asyncfunctionexecuteSkill(userId, skillName, params) {const skillConfig = skillPermissions[skillName];if (!skillConfig) {thrownewError(`未知技能:${skillName}`);  }// 检查权限await permissionManager.requirePermission(    userId,    skillConfig.requiredPermission,`execute_skill:${skillName}`  );// 高风险操作需要确认if (skillConfig.requireConfirmation) {const confirmed = awaitconfirmAction(userId, {skill: skillName,      params,riskLevel: skillConfig.riskLevel    });if (!confirmed) {return'操作已取消';    }  }// 执行技能returnawaitexecute(skillName, params);}

文件访问控制

classFileAccessControl {constructor() {// 允许访问的目录this.allowedDirs = ['~/projects','~/documents','~/workspace'    ];// 禁止访问的目录this.forbiddenDirs = ['~/.ssh','~/.aws','~/.config','/etc','/system','/private'    ];  }asynccheckAccess(filePath, operation) {const resolvedPath = awaitresolvePath(filePath);// 检查是否在禁止目录for (const forbidden ofthis.forbiddenDirs) {if (resolvedPath.startsWith(awaitresolvePath(forbidden))) {awaitlogSecurityEvent({type'forbidden_access',filePath: resolvedPath,          operation,timestampnewDate()        });thrownewError(`禁止访问该目录:${filePath}`);      }    }// 检查是否在允许目录let isAllowed = false;for (const allowed ofthis.allowedDirs) {if (resolvedPath.startsWith(awaitresolvePath(allowed))) {        isAllowed = true;break;      }    }if (!isAllowed) {thrownewError(`只能访问指定目录:${this.allowedDirs.join(', ')}`);    }returntrue;  }}

🔒 敏感信息保护

API Key 管理

classSecretManager {constructor() {// 使用环境变量或密钥管理服务this.storage = process.env.SECRET_STORAGE || 'env';  }asyncget(secretName) {if (this.storage === 'env') {return process.env[secretName];    }if (this.storage === 'aws-secrets') {returnawaitthis.getFromAWSSecrets(secretName);    }if (this.storage === 'vault') {returnawaitthis.getFromVault(secretName);    }thrownewError(`未知的密钥存储方式:${this.storage}`);  }asyncgetFromAWSSecrets(secretName) {const client = newSecretsManagerClient();const response = await client.send(newGetSecretValueCommand({SecretId: secretName    }));return response.SecretString;  }asyncgetFromVault(secretName) {const client = newVaultClient();const secret = await client.read(`secret/${secretName}`);return secret.data.value;  }}// 使用示例const secrets = newSecretManager();const apiKey = await secrets.get('OPENAI_API_KEY');

飞书权限最佳实践 ⭐

## 飞书应用权限配置最佳实践### 1. 最小权限原则只申请必要的权限:**必需权限**- 消息:发送和接收消息(im:message)- 通讯录:读取用户信息(contact:users)**可选权限**(按需申请):- 日历:读取和创建日程(calendar:events)- 任务:读取和创建任务(task:tasks)- 云文档:读写文档(drive:docs)### 2. 权限有效期- 临时权限:设置过期时间- 定期审查:每季度审查一次权限- 及时回收:员工离职时立即回收### 3. 权限隔离- 开发环境:使用测试权限- 生产环境:使用正式权限- 权限分离:不同服务使用不同权限

密钥轮换 ⭐

classKeyRotator {constructor() {this.rotationInterval = 90 * 24 * 60 * 60 * 1000// 90 天  }asyncrotateKey(service) {try {console.log(`开始轮换 ${service} 密钥...`);// 1. 生成新密钥const newKey = awaitthis.generateKey(service);// 2. 更新配置awaitthis.updateConfig(service, newKey);// 3. 验证新密钥const valid = awaitthis.validateKey(service, newKey);if (!valid) {thrownewError('新密钥验证失败');      }// 4. 记录轮换日志awaitthis.logRotation(service);console.log(`${service} 密钥轮换完成`);returntrue;    } catch (error) {console.error(`${service} 密钥轮换失败:`, error);awaitnotifyAdmin(`${service} 密钥轮换失败`, error);returnfalse;    }  }asyncgenerateKey(service) {// 根据不同服务生成密钥switch (service) {case'feishu':returnawaitthis.rotateFeishuAppSecret();case'openai':returnawaitthis.rotateOpenAIKey();default:thrownewError(`不支持的服务:${service}`);    }  }}// 定期轮换任务asyncfunctionscheduleKeyRotation() {const rotator = newKeyRotator();// 每天检查是否需要轮换awaitcreateCronJob({cron'0 2 * * *',  // 每天凌晨 2 点taskasync () => {const keys = awaitlistApiKeys();for (const key of keys) {if (awaitisExpiringSoon(key, 7)) {  // 7 天内过期await rotator.rotateKey(key.service);        }      }    }  });}

数据脱敏

classDataMasker {// 手机号脱敏maskPhone(phone) {return phone.replace(/(\d{3})\d{4}(\d{4})/'$1****$2');  }// 邮箱脱敏maskEmail(email) {const [username, domain] = email.split('@');const maskedUsername = username.slice(02) + '***' + username.slice(-1);return`${maskedUsername}@${domain}`;  }// 身份证脱敏maskIdCard(idCard) {return idCard.replace(/(\d{6})\d{8}(\d{4})/'$1********$2');  }// API Key 脱敏maskApiKey(key) {return key.slice(08) + '...' + key.slice(-4);  }// 自动检测并脱敏maskSensitiveData(text) {// 手机号    text = text.replace(/1[3-9]\d{9}/gm =>this.maskPhone(m));// 邮箱    text = text.replace(/[\w.-]+@[\w.-]+\.\w+/gm =>this.maskEmail(m));// 身份证    text = text.replace(/\d{17}[\dXx]/gm =>this.maskIdCard(m));// API Key(简单模式)    text = text.replace(/[a-zA-Z0-9]{32,}/gm =>this.maskApiKey(m));return text;  }}// 使用示例const masker = newDataMasker();const safeLog = masker.maskSensitiveData(sensitiveLog);

加密存储

const crypto = require('crypto');classEncryptor {constructor(key) {this.algorithm = 'aes-256-gcm';this.key = crypto.createHash('sha256').update(key).digest();  }encrypt(text) {const iv = crypto.randomBytes(16);const cipher = crypto.createCipheriv(this.algorithmthis.key, iv);let encrypted = cipher.update(text, 'utf8''hex');    encrypted += cipher.final('hex');const authTag = cipher.getAuthTag().toString('hex');return {iv: iv.toString('hex'),encryptedData: encrypted,      authTag    };  }decrypt(encrypted) {const decipher = crypto.createDecipheriv(this.algorithm,this.key,Buffer.from(encrypted.iv'hex')    );    decipher.setAuthTag(Buffer.from(encrypted.authTag'hex'));let decrypted = decipher.update(encrypted.encryptedData'hex''utf8');    decrypted += decipher.final('utf8');return decrypted;  }}// 使用示例const encryptor = newEncryptor(process.env.ENCRYPTION_KEY);const encrypted = encryptor.encrypt(sensitiveData);const decrypted = encryptor.decrypt(encrypted);

📋 审计日志

日志记录

classAuditLogger {asynclog(event) {const logEntry = {timestampnewDate().toISOString(),eventIdgenerateId(),      ...event    };// 写入日志文件awaitthis.writeToFile(logEntry);// 发送到日志服务awaitthis.sendToLogService(logEntry);// 检查是否需要告警awaitthis.checkAlert(logEntry);  }asyncwriteToFile(logEntry) {const logFile = `/var/log/openclaw/audit-${newDate().toISOString().slice(010)}.log`;awaitappendFile(logFile, JSON.stringify(logEntry) + '\n');  }asyncsendToLogService(logEntry) {// 发送到 ELK、Splunk 等日志服务awaitfetch(process.env.LOG_SERVICE_URL, {method'POST',headers: { 'Content-Type''application/json' },bodyJSON.stringify(logEntry)    });  }asynccheckAlert(logEntry) {// 安全事件告警if (logEntry.type.startsWith('security.')) {awaitnotifySecurityTeam(logEntry);    }// 高频操作告警if (awaitisHighFrequency(logEntry.userId, logEntry.type)) {awaitnotifyAdmin(`高频操作告警:${logEntry.userId}`);    }  }}// 使用示例const auditLogger = newAuditLogger();await auditLogger.log({type'file.read',userId'user123',filePath'/projects/app/src/main.js',result'success'});await auditLogger.log({type'skill.execute',userId'user456',skillName'exec',params: { command'git status' },result'success'});await auditLogger.log({type'security.unauthorized_access',userId'user789',requiredPermission'write:files',action'delete_file',result'blocked'});

日志查询

classAuditQuery {asyncsearch(filters) {const logs = awaitloadLogs(filters.dateRange);return logs.filter(log => {if (filters.userId && log.userId !== filters.userId) {returnfalse;      }if (filters.type && !log.type.startsWith(filters.type)) {returnfalse;      }if (filters.result && log.result !== filters.result) {returnfalse;      }returntrue;    });  }asyncgetUserActivity(userId, dateRange) {const logs = awaitthis.search({ userId, dateRange });// 统计const stats = {totalActions: logs.length,byType: {},byResult: { success0failure0 }    };    logs.forEach(log => {      stats.byType[log.type] = (stats.byType[log.type] || 0) + 1;      stats.byResult[log.result]++;    });return { stats, logs };  }asyncgetSecurityReport(dateRange) {const securityLogs = awaitthis.search({type'security',      dateRange    });return {totalEvents: securityLogs.length,byTypegroupByType(securityLogs),criticalEvents: securityLogs.filter(l => l.severity === 'critical')    };  }}

🛡️ 安全最佳实践

1. 最小权限原则

// ✅ 好的做法:只授予必要权限awaitgrantPermissions(userId, ['read:documents']);// ❌ 坏的做法:授予过多权限awaitgrantPermissions(userId, ['*']);

2. 定期审计

// 每周审计权限awaitcreateCronJob({cron'0 9 * * 1',taskasync () => {const users = awaitlistAllUsers();for (const user of users) {const report = awaitgeneratePermissionReport(user.id);// 检查是否有过多权限if (report.hasExcessivePermissions) {awaitnotifyAdmin(`用户 ${user.name} 权限过多,请审查`);      }    }  }});

3. 密钥轮换

// 每 90 天轮换一次 API KeyawaitcreateCronJob({cron'0 0 1 * *',taskasync () => {const keys = awaitlistApiKeys();for (const key of keys) {if (awaitisExpiringSoon(key)) {const newKey = awaitrotateKey(key.service);awaitupdateKey(key.service, newKey);console.log(`已轮换 ${key.service} 密钥`);      }    }  }});

4. 异常检测

asyncfunctiondetectAnomalies() {const logs = awaitgetRecentLogs();// 检测异常登录const loginsByIp = groupBy(logs, l => l.ip);for (const [ip, loginLogs] ofObject.entries(loginsByIp)) {if (loginLogs.length > 10) {awaitalert(`异常登录:${ip} 在 1 小时内登录 ${loginLogs.length} 次`);    }  }// 检测异常文件访问const fileAccess = logs.filter(l => l.type.startsWith('file.'));const sensitiveAccess = fileAccess.filter(l =>    l.filePath.includes('sensitive')  );if (sensitiveAccess.length > 5) {awaitalert(`异常文件访问:1 小时内访问敏感文件 ${sensitiveAccess.length} 次`);  }}

✅ 学完这篇你能做什么

学完 Day 23,你将能够:

  • ✅ 配置基于角色的权限
  • ✅ 保护敏感信息
  • ✅ 配置审计日志
  • ✅ 实施密钥轮换
  • ✅ 检测异常行为

🔜 下篇预告

Day 24:性能调优:并发处理、缓存策略、资源优化

  • ⚡ 并发处理
  • 💾 缓存策略
  • 📊 资源优化

💬 互动环节

你在安全方面遇到过什么问题?留言分享!


公众号:OpenClaw 研习社

系列:OpenClaw 30 天入门到精通 

作者:OpenClaw 研习社

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-04-01 13:19:47 HTTP/1.1 GET : https://www.yeyulingfeng.com/a/495123.html
  2. 运行时间 : 0.225111s [ 吞吐率:4.44req/s ] 内存消耗:4,904.54kb 文件加载:145
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=9c671e30dadd0c0e1c60c489552dcb5a
  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.80 KB )
  145. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-trace/src/Html.php ( 4.42 KB )
  1. CONNECT:[ UseTime:0.001121s ] mysql:host=127.0.0.1;port=3306;dbname=wenku;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.001849s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.000902s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.001113s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000816s ]
  6. SELECT * FROM `set` [ RunTime:0.004345s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.000682s ]
  8. SELECT * FROM `article` WHERE `id` = 495123 LIMIT 1 [ RunTime:0.001951s ]
  9. UPDATE `article` SET `lasttime` = 1775020787 WHERE `id` = 495123 [ RunTime:0.006320s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 64 LIMIT 1 [ RunTime:0.000292s ]
  11. SELECT * FROM `article` WHERE `id` < 495123 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.000522s ]
  12. SELECT * FROM `article` WHERE `id` > 495123 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.005073s ]
  13. SELECT * FROM `article` WHERE `id` < 495123 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.001123s ]
  14. SELECT * FROM `article` WHERE `id` < 495123 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.007426s ]
  15. SELECT * FROM `article` WHERE `id` < 495123 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.004135s ]
0.226766s