Update config.inc.php
Browse files- config.inc.php +1 -1
config.inc.php
CHANGED
@@ -20,7 +20,7 @@ require_once __TYPECHO_ROOT_DIR__ . '/var/Typecho/Common.php';
|
|
20 |
//DB_COON_STR = 'mysql://user:[email protected]:3306/dbname'
|
21 |
if(!getenv('DB_HOST')){
|
22 |
$matches = [];
|
23 |
-
preg_match("/^(mysql:\/\/)?([^:]*?):(.*?)@([^@^:]*?):?(\d+)
|
24 |
putenv('DB_USER='.$matches[2]);
|
25 |
putenv('DB_PASS='.$matches[3]);
|
26 |
putenv('DB_HOST='.$matches[4]);
|
|
|
20 |
//DB_COON_STR = 'mysql://user:[email protected]:3306/dbname'
|
21 |
if(!getenv('DB_HOST')){
|
22 |
$matches = [];
|
23 |
+
preg_match("/^(mysql:\/\/)?([^:]*?):(.*?)@([^@^:]*?):?(\d+)?\/([^\/]*?)$/", getenv('DB_COON_STR'), $matches);
|
24 |
putenv('DB_USER='.$matches[2]);
|
25 |
putenv('DB_PASS='.$matches[3]);
|
26 |
putenv('DB_HOST='.$matches[4]);
|