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