【发布时间】:2012-01-27 03:46:15
【问题描述】:
我正在使用 Yii。
如果我的网址是http://localhost/evengee/event/page/id/2/sfn+master/?tab=3
我的真实网址(文件路径)只有http://localhost/evengee
我将如何获得,最好在视图中:
- 完整网址
http://localhost/evengee/event/page/id/2/sfn+master/?tab=3 - url不带显式参数
http://localhost/evengee/event/page/id/2/sfn+master/
我知道我可以将 str_replace 拆分/分解为 ?并使用 $_SERVER。更愿意使用 Yii 原生方法。
【问题讨论】:
标签: php url yii url-routing