对于默认模块, 视图文件的路径是在application目录下的views目录中以小写的action名的目录中
如:IndexController的indexAction 对应视图: application/views/index/index.phtml
<html>
<head>
<title>Hello World</title>
</head>
<body>
<?php echo $content;?>
</body>
</html>
在bootstrap.php中,关闭默认的视图自动渲染
Yaf_Dispatcher::getInstance()->autoRender(false);
$dispatcher->getInstance()->disableView();
在application.ini中配置模板文件的后缀名,默认为 phtml
application.view.ext = "html"
$this->getView()->assign('user','lvtao');
echo $this->getView()->render('User/index.phtml');
$this->getView()->display('User/index.phtml');