Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个不同的homeUrl,我希望createUrl()在调用该方法时使用它
homeUrl
createUrl()
例如
Yii::app()->homeUrl = Yii::app()->params['myurl'];
但是当我这样做时
$this->createUrl(Yii::app()->homeUrl.'controller/action');
我得到两个不同的网址......如何解决这个问题?
萨索里,
您可能需要执行以下操作:
<?php echo Yii::app()->homeUrl.'?r=controller/action';?>
将输出/app/index.php?r=controller/action