仰望星辰工作室

better-staridc-MNBT

better-staridc-MNBT/ MPHX/BL.php 642 B · 22 行 原始文件
Z zfhsh first commit 2 天前
1<?php
2$WEBQB='1850';
3$SQLQB='1310';
4
5// 版本号唯一数据源是上面的 $WEBQB(如 1850 => V1.85)。
6// 全项目对外显示版本一律走下面两个函数,发版只改 $WEBQB 这一处。
7// BL.php 会被多处 include(非 once),所以用 function_exists 兜住重复定义。
8if (!function_exists('mnbt_version_num')) {
9 // 纯数字串:1850 => "1.85"
10 function mnbt_version_num()
11 {
12 return sprintf('%.2f', (int)($GLOBALS['WEBQB'] ?? 0) / 1000);
13 }
14}
15if (!function_exists('mnbt_version')) {
16 // 带前缀显示:1850 => "V1.85"
17 function mnbt_version($prefix = 'V')
18 {
19 return $prefix . mnbt_version_num();
20 }
21}
22?>