Cakephp $ this-> request-> params ['pass'] [0]是什么意思?

时间:2013-12-18 02:52:04

标签: php cakephp cakephp-2.0

您好我需要帮助这一行代码,我已经在我找到的$this->request->params['pass'][0]文档中搜索过但我无法理解它的用法是什么

$this->request->params['pass'][0]是什么意思?

有人可以帮助我吗?

1 个答案:

答案 0 :(得分:10)

http://book.cakephp.org/2.0/en/controllers/request-response.html

$this->request->params['pass'] 

表示url中传递的参数

示例:您的请求网址localhost/calendars/view/recent/mark

recentmark都会将参数传递给CalendarsController::view()

$this->request->params['pass']是一个值为array ([0]=>recent [1]=>mark)

的数组

所以,在上面的例子中

$this->request->params['pass'][0] = "recent"
相关问题