PHP Classes

File: yii/framework/yiic.php

Recommend this page to a friend!
  Classes of Adnane EL Mouttaki   Covoiturage   yii/framework/yiic.php   Download  
File: yii/framework/yiic.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Covoiturage
System for managing a car pooling service
Author: By
Last change:
Date: 6 years ago
Size: 834 bytes
 

Contents

Class file image Download
<?php
/**
 * Yii command line script file.
 *
 * This script is meant to be run on command line to execute
 * one of the pre-defined console commands.
 *
 * @author Qiang Xue <qiang.xue@gmail.com>
 * @link http://www.yiiframework.com/
 * @copyright 2008-2013 Yii Software LLC
 * @license http://www.yiiframework.com/license/
 */

// fix for fcgi
defined('STDIN') or define('STDIN', fopen('php://stdin', 'r'));

defined('YII_DEBUG') or define('YII_DEBUG',true);

require_once(
dirname(__FILE__).'/yii.php');

if(isset(
$config))
{
   
$app=Yii::createConsoleApplication($config);
   
$app->commandRunner->addCommands(YII_PATH.'/cli/commands');
}
else
   
$app=Yii::createConsoleApplication(array('basePath'=>dirname(__FILE__).'/cli'));

$env=@getenv('YII_CONSOLE_COMMANDS');
if(!empty(
$env))
   
$app->commandRunner->addCommands($env);

$app->run();