#################禁用布局和视图#############
/* $this->_helper->layout()->disableLayout();
$this->_helper->layout->disableLayout();
$this->_helper->viewRenderer->setNoRender();
下面这种方法引入当前视图和error视图,两个一起引入
echo $this->view->render("index/error.phtml");
$this->renderScript("index/error.phtml");
$this->render();
$this->render("error");
$this->_helper->viewRenderer("error");
*/
#################翻译#############
/* $translate = Zend_Registry::get('Zend_Translate');
echo $translate->translate('admin'); */
############json#################
/*
$data = array(1,2,3);
//下面这两种方法效果是一样的,实现方法一样
$this->_helper->json($data);
$this->_helper->json->sendJson($data);
//仅编码,不输出
/* $this->_helper->layout()->disableLayout();
$this->_helper->layout->disableLayout();
$this->_helper->viewRenderer->setNoRender();
下面这种方法引入当前视图和error视图,两个一起引入
echo $this->view->render("index/error.phtml");
$this->renderScript("index/error.phtml");
$this->render();
$this->render("error");
$this->_helper->viewRenderer("error");
*/
#################翻译#############
/* $translate = Zend_Registry::get('Zend_Translate');
echo $translate->translate('admin'); */
############json#################
/*
$data = array(1,2,3);
//下面这两种方法效果是一样的,实现方法一样
$this->_helper->json($data);
$this->_helper->json->sendJson($data);
//仅编码,不输出
$json = $this->_helper->json->encodeJson($data); */