【发布时间】:2011-06-22 20:04:55
【问题描述】:
通常在 xhr 操作中我使用此代码
$this->_helper->layout->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);
$response = $this->getResponse();
$response->setHeader('Content-type', 'application/json', true);
return $response->setBody(Zend_Json::encode($data));
我想知道它是否需要像这样的utf-8编码
$response->setHeader('Content-type', 'application/json;charset=UTF-8', true);
【问题讨论】:
标签: php json zend-framework