fetch() public method

解析和获取模板内容 用于输出
public fetch ( string $template = '', array $vars = [], array $replace = [], array $config = [], boolean $renderContent = false ) : string
$template string 模板文件名或者内容
$vars array 模板输出变量
$replace array 替换内容
$config array 模板参数
$renderContent boolean 是否渲染内容
return string
示例#1
0
文件: index.php 项目: apple006/think
 public function index()
 {
     Slog::log('调试');
     $view = new View();
     return $view->fetch();
 }
示例#2
0
文件: index.php 项目: houseme/think
 public function index()
 {
     $view = new View();
     return $view->fetch();
 }