support loading config by alias.

This commit is contained in:
Qiang Xue
2014-02-08 10:29:53 -05:00
parent f5f6f206b4
commit aeeee44f69

View File

@ -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");
}