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

Qiang Xue committed
11 12
defined('YII_DEBUG') or define('YII_DEBUG', true);

Qiang Xue committed
13 14 15
// fcgi doesn't have STDIN defined by default
defined('STDIN') or define('STDIN', fopen('php://stdin', 'r'));

16
require(__DIR__ . '/vendor/yiisoft/yii2/yii/Yii.php');
Qiang Xue committed
17
require(__DIR__ . '/vendor/autoload.php');
Qiang Xue committed
18
Yii::importNamespaces(require(__DIR__ . '/vendor/composer/autoload_namespaces.php'));
Qiang Xue committed
19 20 21 22

$config = require(__DIR__ . '/config/console.php');

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