How do you make Zend Framework NOT render a view/layout when sending an AJAX response?

前端 未结 3 2000

Zend\'s documentation isn\'t really clear on this.

The problem is that, by default, Zend automatically renders a view at the end of each controller action. If you\'re us

3条回答
  •  终归单人心
    2021-01-30 07:25

    Or you could simply put die() function at the end of the action

    public function someAction()
    {
        echo json_encode($data);
        die();
    }
    

提交回复
热议问题