yii 990 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10
#!/usr/bin/env php
<?php
/**
 * Yii console bootstrap file.
 *
 * @link http://www.yiiframework.com/
 * @copyright Copyright (c) 2008 Yii Software LLC
 * @license http://www.yiiframework.com/license/
 */

11 12
defined('YII_DEBUG') or define('YII_DEBUG', false);
defined('YII_ENV') or define('YII_ENV', 'prod');
13

14
// fcgi doesn't have STDIN and STDOUT defined by default
15 16
defined('STDIN') or define('STDIN', fopen('php://stdin', 'r'));
defined('STDOUT') or define('STDOUT', fopen('php://stdout', 'w'));
17 18

require(__DIR__ . '/vendor/autoload.php');
Qiang Xue committed
19
require(__DIR__ . '/vendor/yiisoft/yii2/Yii.php');
Alexander Kochetov committed
20
require(__DIR__ . '/common/config/aliases.php');
21 22

$config = yii\helpers\ArrayHelper::merge(
23 24
	require(__DIR__ . '/common/config/main.php'),
	require(__DIR__ . '/common/config/main-local.php'),
25 26 27 28 29
	require(__DIR__ . '/console/config/main.php'),
	require(__DIR__ . '/console/config/main-local.php')
);

$application = new yii\console\Application($config);
30 31
$exitCode = $application->run();
exit($exitCode);