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

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -