http status code 404 - Zend Framework: How to intentionally throw a 404 error? -


i intentionally cause 404 error within 1 of controllers in zend framework application. how can this?

a redirect 404 be:

throw new zend_controller_action_exception('your message here', 404); 

or without exception:

$this->_response->clearbody(); $this->_response->clearheaders(); $this->_response->sethttpresponsecode(404); 

Comments

Popular posts from this blog

SAP Web Service from .NET via WCF -

Optimized Line drawing in QT -

datetime - str to time in python -