cha*_*ser 6 header response forward hide symfony
我试图将2个控制器结果放在一个控制器中,所以我使用'$response = $this->forward('Bundle:Controller:functionXXX');' 转发第一个控制器.
在控制器' functionXXXAction'我使用renderView返回响应.
问题是转发函数在页面顶部返回此标题:
"HTTP/1.0 200 OK Cache-Control: no-cache Date: Wed, 24 Apr 2013 09:56:50 GMT"
Run Code Online (Sandbox Code Playgroud)
任何解决方案将其隐藏在页面中?!
小智 2
这个问题有点老了,但也许将来有人会寻找答案。要摆脱标头,您只需调用: $response = $this->forward('Bundle:Controller:functionXXX'); $response->getContent();
| 归档时间: |
|
| 查看次数: |
1301 次 |
| 最近记录: |