index.php:
<? //load yii framework (you'll likely have to change the path):
require_once( dirname(__FILE__).'/../../yii/framework/yii.php' );
//create the app. note that it does not require a config file, you can just pass in an array:
$app = Yii::createWebApplication( array ( 'basePath' => dirname( __FILE__ ) , // if you don't want Protected folder 'controllerPath' => '' // if you don't want Controllers folder ))->run(); ?>SiteController.php:
<? class SiteController extends CController { public function actionIndex() { echo 'hello world'; } } ?>Now, this doesn't work with Gii or crazy things like assets, but that's probably the smallest Yii installation you can make
No comments:
Post a Comment