开发者

Get the pagename of the URL

I have a url like this: http://www.sample.com/widget/mywidget/

How can I get only the "mywidget" in开发者_运维知识库 the url?


Try debug($this->params) inside your controller and have a look at what's available inside the array.

You will find a number of URL parts inside that property, including the 'action' key, which I think is what you're looking for.


You can try the code below:

echo $this->params->pass['1']
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜