unable to access zend views from controller file
I am able to print the form content in the controller file, but when I assign the form view as $this->view->form = $form
and trying to display the form design using echo $this->form
in login开发者_StackOverflow社区.phtml
file, form design is not viewed, instead displaying blank page....
What could be the issue ??
Looks like it should work:
// in the controller
$this->view->form = $form;
// in the view
<?= $this->form ?>
So the problem is somewhere else.
The blank page is displayed probably due to that the error_reporting
is turrned off.
Update application.ini
and set error_reporting
, displaying errors and throwing exceptions to true
to see what is actually happening.
Edit:
Things to check:
- Is your view initialized?
- Does your
application.ini
contains anyresources.view[]=
- haven't you accidentally overwritten the view?
$this->view = null
精彩评论