Installation in a subdirecktory


I want to install yii in some subdirecktory e.g.

I have uploaded files in to direcktory yii-framework is working.

I create with a console "new site".

.../yii-framework/framework> php yiic webapp ../

I change in the the file .../yii-framework/index.php

the line “$yii=dirname(FILE).’/../yii.php’;” with

the line “$yii=dirname(FILE).’/framework/yii.php’;”

The original "new site" is working.

The line "<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/form.css" />" shows at "" it is o.k.

But the line “<?php Yii::app()->clientScript->registerCssFile(’/css/form.css’); ?>” shows at “” it is NOT o.k.

Is there some variable to set my subdirecktory?

If the first line work, than just use the baseUrl in the second line like:


Also check out the bu() shortcut helper, mentioned in this cookbook, which can be used like:

<img src="<?php echo bu('img/icon.gif'); ?>" />

Thanks all!


It’s working fine.

It was nice to have BU-prefix in registerCssFile and co. methods.