I want to get the body html response form a
controller action but with this code
$response = $this->getResponse();
Zend_Debug::dump($response->getBody());
I’ve got an empty string
so I’m wondering what’s the problem 🙁
Thanks in advance.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you are doing that in your controller, the body it’s yet empty. If you want to get the response html of the body, you can use:
$this->view->layout()->disableLayout();
In your action. With that, you can get the response html as the response of your controller.