{basePath}
1 | echo Yii::app()->basePath; |
path/to/protected
{like} /YiiBlog/protected
{theme baseUrl}
1 | echo Yii::app()->theme->baseUrl; |
path/to/themes/themeName
{like} /YiiBlog/themes
{request baseUrl}
1 | echo Yii::app()->request->baseUrl; |
{full URL}
1 | http: //localhost/yii_lab/index.php?r=lab/urlBoyLeeTest |
{Yii::app()->request->hostInfo}
1 | echo (Yii::app()->request->hostInfo); |
2 | //out => http://localhost |
{createUrl()}
1 | echo $this ->createUrl( 'urlBoyLeeTest' ); |
2 | //out => /yii_lab/index.php?r=lab/urlBoyLeeTest |
{createAbsoluteUrl()}
1 | echo $this ->createAbsoluteUrl( 'urlBoyLeeTest' ); |
2 | //out => http://localhost/yii_lab/index.php?r=lab/urlBoyLeeTest |