0
我试图让Zend在数组中包含少于10个元素时抛出一个404错误,但它目前只是给我发送一个通用的“错误”页面。我知道404异常配置正确,因为他们在网站的其他地方工作,所以它必须是一个问题,我的参数或东西...Zend_Controller_Action_Exception没有显示404页面
我试过格式这几种不同的方式,我检查了Zend API以确保我传递的参数是正确的,他们似乎是正确的,但我必须做错了什么。
我的代码是目前如下:
$properties = array(1,2,3,4,5,6,7,8,9)
if (count($properties) < 10){
throw new Zend_Controller_Action_Exception('Page does not exist.', 404);
}
$this->view->rows = $properties;
$this->callRender();
感谢您的时间。