1
调试工具栏不会加载,当我使用此代码的控制器,但网站加载正确,我没有得到任何错误的日志。symfony2调试工具栏不加载
function indexAction(){
//this configures the $html which is global works correctly
include "/index.php";
$response = new Response();
$response->setContent($html);
$response->setStatusCode(Response::HTTP_OK);
$response->headers->set('Content-Type','text/html');
return $response;
}
但是当我使用这个代码任意一块,而不是
function indexAction(){
$bar = "<html><body>foo : random piece of text</body></html>";
$response = new Response();
$response->setContent($bar);
$response->setStatusCode(Response::HTTP_OK);
$response->headers->set('Content-Type','text/html');
return $response;
}
我已经意识到,当我使用的第一个代码,我没有得到一个路由匹配日志中的_wdt它的工作问题在哪里?
更新:如果我删除从$栏中的身体标记像这样:
$bar = "<html>foo: random piece of text</html>"
它不会工作either.i认为它是与不是正确的页面HTML标记为在规定symfony2中的eventlistener文档。但是我知道我的页面已经被正确地标记了。也查看了浏览器中页面loas后的源代码。那么这里有什么问题?
对于正确询问的问题+1。不幸的是,我无法帮助 – hek2mgl