目录结构

  • index.php:前台入口与路由分发
  • admin/routes.php:后台全部路由
  • core/:核心库(数据库、SEO、助手函数、守卫)
  • templates/themes/:主题模板
  • templates/plugins/:插件
  • data/:数据库与可写目录

主题开发

  1. 复制任一主题目录为新主题,改 theme.json 元数据
  2. 模板文件按约定命名:index / list / show / news / about / contact
  3. 使用 theme_asset() 输出静态资源路径
  4. 模板内可调用 DB::* 与助手函数取数据

插件开发

插件入口文件提供 {plugin_name}_check() 钩子,约定 AJAX 路径为 /ajax/{plugin-name}。插件设置存于 plugin_settings 表。

完整性封印

二次开发修改受保护文件后,必须执行 php tools/rs_seal.php 重新封印,否则程序会因签名校验失败而锁定。

受保护文件清单见 core/guard.php 的 rs_guard_targets()。