0
我嘗試在Symfony2中發送的HTML代碼:方法返回HTML Symfony2的
public function testAction()
{
$html = '<input type="text">'
return $this->render('TestBundle:Default:index.htlm.twig',array(
'html' => $html,
));
}
當我使用的HTML變量在頁面index.html.twig這樣的:{{ html }}
結果是
<input type="text">
但我不想要這個結果。我想要的結果是頁面index.html.twig顯示我的輸入(文本區域)。