php - Zend throw 404 headers in development mode -


so i'm working on application , ajax calls controller, , in case of no data throws 404.

throw new zend_controller_action_exception('this page not exist', 404); 

the problem have $this->frontcontroller->throwexceptions(true); in development mode throws error, doesn't set 404 header, , need header because in ajax call based on header know what's next.

is there way throw 404 header in dev mode throwexceptions set true?

you should use errorhandler plugin , register errorcontroller indicate 404 page, described here:

http://framework.zend.com/manual/1.12/en/zend.controller.plugins.html#zend.controller.plugins.standard.errorhandler


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -