0
我在Symfony3是新的,我用嫩枝呈现模板,一切都很好,但是当我想切换到PHP使我得到了错误:Symfony的PHP渲染
我的类:
class Testdb extends Controller
{
/**
* @Route("/testdb")
*
*/
public function testing()
{
//return $this->render('testdb.html.twig',array('result'=>$result));
return $this->render('testdb.html.php',array('result'=>$result));
}
}
我把我的testdb.html.php在app /资源/视图/ 和我编辑config.yml:
templating:
engines: ['twig','php']
的,当我浏览ttp://127.0.0.1:8000/testdb
我得到The template "testdb.html.php" does not exist
https://github.com/symfony/symfony/issues/15272是否为您解决它? – xabbuh