用AI赚第一桶💰低成本搭建一套AI赚钱工具,源码可二开。 广告
# view 通过加载器加载并返回一个模板 函数原型 ```php /** * view 返回一个模板 * @param $template * @return \League\Plates\Template\Template */ public function view($template) ``` 例子: ```php /** * html测试 */ public function http_html_test() { $template = $this->loader->view('server::error_404'); $this->http_output->end($template->render(['controller'=>'TestController\html_test','message'=>'页面不存在!'])); } ``` > server::error_404 是指Server/Views下的error_404.php文件 app::error_404 是指app/Views下的error_404.php文件 具体的请参考Plates模板引擎。 模板引擎参考[plates](http://platesphp.com/)