我有layout.html,1.html,2.html。{{end}}{{define "content"}}This is the second page.{{end}}var templates = template.Must(template.ParseFiles( "1.html","2.html"))
因为2.html覆盖了1
page我确实尝试过这样的方法,但没有用:ob_end_flush();
因此,基本上,用户在html表单的输入字段中输入2,并且html文件应该被称为2.html。我得到了一个错误:
Warning: file_put_contents(2.html) [function.file-put-contents]: failed to op