ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
``` /** * 载入版权信息页 * @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)