yiic.php 456 B

12345678910111213141516
  1. <?php
  2. // change the following paths if necessary
  3. foreach ($_SERVER['argv'] as $k => $v) {
  4. if (strpos($v, '--YII_ENV=') !== FALSE) {
  5. $env = substr($v, strlen('--YII_ENV='));
  6. }
  7. }
  8. $yiic=dirname(__FILE__).'/../framework/yiic.php';
  9. $configFile = dirname(__FILE__)."/config/cache/console.{$env}.php";
  10. if (! file_exists($configFile)) {
  11. $configFile=dirname(__FILE__)."/config/console.{$env}.php";;
  12. }
  13. $config=$configFile;
  14. require_once($yiic);