I am new with zend framework. I am working in backend(the admin area of website) and want ot use escape but my view page is not supporting this. when I use escape method in view page, view page does not show anything. For this what I can do so I can use escape method in view page in admin area. Here is my code in controller:-
$this->view->assign('username', 'Username');
$this->view->assign('password', 'Password');
$this->view->assign('rememberMe', 'Remember Me');
I am using this assign variable in view page like this:-
<td id="userlogin" align="left" width="30%"><?php echo escape($this->username);?>:</td>
But escape method is not supported by my view page in admin area. Please suggest me a trick for this...
I think you mean
<?php echo $this->escape($this->username);?>
escape is a function of the Zend_View
class ($this
in the context of templates) rather than a global PHP function.
来源:https://stackoverflow.com/questions/11135434/escape-method-is-not-supported-by-view-page-in-admin-area-or-backend-of-site-in