静态资源版本收敛到 FB_ASSET_V 常量 (#1)

原先 layout.php 与 install.php 各写一份 style.css?v=N,改样式时只改一处,
另一处会漂移 —— 实际就发生了:首页 v=10、安装页还是 v=7,两页样式不一致。

现在统一在 lib/bootstrap.php 定义 FB_ASSET_V,两处都引用它。
以后改 assets 下的 css/js,只改这一个数字。
This commit is contained in:
2026-11-01 12:47:41 +08:00
parent 9b822d2d9a
commit 7a578fac47
3 changed files with 5 additions and 2 deletions
+3
View File
@@ -6,6 +6,9 @@
if (!defined('FB_ROOT')) {
define('FB_ROOT', dirname(__DIR__));
// 静态资源版本号:改 assets/ 下的 css/js 后把这个数字 +1,
// 让浏览器与 CDN 缓存失效。全站只此一处,别再往页面里写死数字。
if (!defined('FB_ASSET_V')) { define('FB_ASSET_V', 10); }
}
/* ------------------------------------------------------------------