mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-25 10:58:41 +00:00
feat(web): db port
This commit is contained in:
parent
8cf76566cb
commit
4957f3aaea
@ -12,7 +12,8 @@ return [
|
||||
'database' => 'app_uoj233',
|
||||
'username' => 'root',
|
||||
'password' => '_database_password_',
|
||||
'host' => '127.0.0.1'
|
||||
'host' => '127.0.0.1',
|
||||
'port' => '3306',
|
||||
],
|
||||
'web' => [
|
||||
'domain' => null,
|
||||
|
@ -3,7 +3,7 @@
|
||||
class DB {
|
||||
public static function init() {
|
||||
global $uojMySQL;
|
||||
@$uojMySQL = mysqli_connect(UOJConfig::$data['database']['host'] . ':3306', UOJConfig::$data['database']['username'], UOJConfig::$data['database']['password'], UOJConfig::$data['database']['database']);
|
||||
@$uojMySQL = mysqli_connect(UOJConfig::$data['database']['host'] . ':' . UOJConfig::$data['database']['port'], UOJConfig::$data['database']['username'], UOJConfig::$data['database']['password'], UOJConfig::$data['database']['database']);
|
||||
if (!$uojMySQL) {
|
||||
echo 'There is something wrong with database >_<.... ' . mysqli_connect_error();
|
||||
die();
|
||||
|
Loading…
Reference in New Issue
Block a user