escape method is not supported by view page in admin area or backend of site in zend framework?

爱⌒轻易说出口 提交于 2019-12-01 12:45:11

问题


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...


回答1:


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!