Commit aeeee44f by Qiang Xue

support loading config by alias.

parent f5f6f206
......@@ -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");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment