HUH函数
<?php echo Yii::app()->baseUrl;?> <?php echo "</br>";?> //baseUrl<?php echo Yii::app()->request->hostInfo;?> <?php echo "</br>";?>//主机信息路径<?php echo Yii::app()->request->getUrl();?> <?php echo "</br>";?><?php echo Yii::app()->request->baseUrl; ?> <?php echo "</br>";?>//baseUrl<?php echo $this->createUrl('post/read',array('id'=>100));?> <?php echo "</br>";?>//1个参数示例<?php echo $this->createUrl('post/read',array('id'=>100,'year'=>2008));?><?php echo "</br>";?>//2个参数示例<?php echo $this->createAbsoluteUrl('post/read',array('id'=>100));?><?php echo "</br>";?>//全路径createUrl和createAbsoluteUrl可以创建带参数的url,然后可以用GET获取。<?php echo $id = isset($_GET['id'])?$_GET['id']:null;?><?php echo "</br>";?>