mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-26 06:15:19 +08:00
support loading config by alias.
This commit is contained in:
@ -98,8 +98,8 @@ class Application extends \yii\base\Application
|
||||
foreach ($_SERVER['argv'] as $param) {
|
||||
if (strpos($param, $option) !== false) {
|
||||
$path = substr($param, strlen($option));
|
||||
if (!empty($path) && is_file($path)) {
|
||||
return require($path);
|
||||
if (!empty($path) && is_file($file = Yii::getAlias($path))) {
|
||||
return require($file);
|
||||
} else {
|
||||
die("The configuration file does not exist: $path\n");
|
||||
}
|
||||
|
Reference in New Issue
Block a user