2011-03-26 05:33:55 0 评论 Yii 1.0 Boy.Lee

Yii 1.0 控制 URL

{full URL}

http://yiilib.com/yii_lab/index.php?r=lab/urlBoyLeeTest

 

{Yii::app()->request->hostInfo}

echo(Yii::app()->request->hostInfo);
//out => http://yiilib.com

 

{createUrl()}

echo $this->createUrl('urlBoyLeeTest');
//out => /yii_lab/index.php?r=lab/urlBoyLeeTest

 

{createAbsoluteUrl()}

echo $this->createAbsoluteUrl('urlBoyLeeTest');
//out => http://yiilib.com/yii_lab/index.php?r=lab/urlBoyLeeTest
//A+B ^&^

 

use it free in your way.