(Yaf >=1.0.0)
Yaf_View_Simple::getScriptPath — 获取模板目录
此函数没有参数。
以字符串形式返回模板目录;如果尚未设置,则返回 null。
示例 #1 Yaf_View_Simple::getScriptPath() 示例
<?php
class IndexController extends Yaf_Controller_Abstract
{
public function indexAction()
{
/* 查找模板时使用的目录,
* 通常是 application.view.directory */
echo $this->getView()->getScriptPath();
}
}
?>以上示例的输出类似于:
/var/www/html/application/views