【发布时间】:2010-07-22 13:12:20
【问题描述】:
我想知道 zend 视图动作助手的参数是通过什么方法传递的? get 或 post。是因为我似乎无法通过$_GET 和$_POST 访问它们,但我可以通过$this->getRequest()->getParam("xxx") 访问它们
然后我想在使用它之前检查变量是否存在,所以我这样做了
$itemsPerPage = isset($this->getRequest()->getParam("itemsPerPage")) ? $this->getRequest()->getParam("itemsPerPage") : 5;
失败了
致命错误:无法使用方法返回 写入上下文中的值 D:\Projects\Websites\php\ZendFramework\LearningZF\application\controllers\IndexController.php 第 21 行
不知道怎么了
【问题讨论】:
标签: zend-framework