I would like to add a Web site to export static Web features, what good solution can be quickly exported?
Reply content:
I would like to add a Web site to export static Web features, what good solution can be quickly exported?
Isn't there a function of file_put_content ()?
Need to use the Ob_start () series method,
Simulation requests, such as Curl file_get_contents, are very inefficient and various frameworks are implemented with OB
The phone side of the code word difficult, unknown said
You can look at the output control function in PHP
Why don't you just grab a mirror with wget and hit a tgz pack to download it?
' Ob_start ();
Template processing
echo Template Content
$content = Ob_get_contents ();
Ob_end_clean ();
File_put_contents ('./demo.html ', $content); '
It can also be implemented with the smart template, as shown below:
assign("title","Hello World!");$content = $t->fetch("templates/index.htm");//这里的 fetch() 就是获取输出内容的函数,现在$content变量里面,就是要显示的内容了$fp = fopen("archives/2005/05/19/0001.html", "w");fwrite($fp, $content);fclose($fp);?>
It's also easy to use.