【发布时间】:2011-08-04 20:13:16
【问题描述】:
由于某种原因,这在 Kohana 3.2 中不起作用:
$this->request->headers['Content-Type'] = 'text/xml';
自 Kohana 3.1 以来这是否发生了变化?
【问题讨论】:
标签: php header kohana content-type kohana-3
由于某种原因,这在 Kohana 3.2 中不起作用:
$this->request->headers['Content-Type'] = 'text/xml';
自 Kohana 3.1 以来这是否发生了变化?
【问题讨论】:
标签: php header kohana content-type kohana-3
它也不应该在 3.1 中工作,但这应该:
$this->request->headers('Content-Type', 'text/xml');
见http://kohanaframework.org/3.2/guide/api/Request#headers 这是从 3.1 开始的请求/响应重构更改之一。
【讨论】: