多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
``` /** * 载入版权信息页 * @return mixed * @throws \think\db\exception\BindParamException * @throws \think\exception\PDOException */ public function copy() { $db_version = $this->auth_rule->query('select version()'); $db_version = $db_version ? $db_version[0]['version()'] : @mysql_get_server_info(); $this->assign('mysql_version', $db_version); $sys_info['mysqlsize'] = $this->auth_rule->query("select round(sum(DATA_LENGTH/1024/1024)+sum(DATA_LENGTH/1024/1024),2) as db_length from information_schema.tables where table_schema='" . config('database.database') . "'"); $this->assign('mysqlsize', $sys_info['mysqlsize'][0]['db_length']); return $this->fetch(); } ``` >前台输出 ``` <tr> <td>服务器MySQL版本:</td> <td>{$mysql_version}</td> </tr> <tr> <td>当前数据库尺寸:</td> <td>{$mysqlsize}</td> </tr> ``` ![](https://img.kancloud.cn/fb/fa/fbfa0c07f42055b9cfe4e5f50148918e_902x168.png)