嗨,我需要这行代码的帮助,我已经在我找到$this->request->params['pass'][0]
的文档中搜索但是我无法理解它的用途是什么
$this->request->params['pass'][0]
是什么意思?
有人可以帮助我吗?
http://book.cakephp.org/2.0/en/controllers/request-response.html
$this->request->params['pass']
表示url中传递的参数
示例:您的请求网址localhost/calendars/view/recent/mark
recent
和mark
都被传递给CalendarsController::view()
$this->request->params['pass']
是一个值array ([0]=>recent [1]=>mark)
的数组
所以,在上面的例子中
$this->request->params['pass'][0] = "recent"