tp6 静态页面如何生成
那位大神指导下
public function buildHtml($htmlfile = '', $htmlpath = '', $templateFile = '')
{
$content = $this->fetch($templateFile);
$htmlpath = !empty($htmlpath) ? $htmlpath : './app/';
$htmlfile = $htmlpath . $htmlfile . '.'.config('url_html_suffix');
$File = new \think\template\driver\File();
$File->write($htmlfile, $content);
return $content;
}
tp5中这个方法可以使用tp6就不行了
最佳答案