I want to add a function for exporting static web pages to my website. can I export static web pages quickly? I want to add a function for exporting static web pages to my website. can I export static web pages quickly?
Reply content:
I want to add a function for exporting static web pages to my website. can I export static web pages quickly?
Isn't there a file_put_content () function?
The ob_start () series method is required,
Using curl file_get_contentS and other analog requests will be very inefficient, and various frameworks are implemented using ob
It is difficult to enter a code word on the mobile phone end.
Let's take a look at the Output Control function in php.
Why not use wget to capture a mirror and then download a tgz package?
'OB _ start ();
// Template processing
// Echo template content
$ Content = ob_get_contents ();
Ob_end_clean ();
File_put_contents ('./demo.html', $ content );'
You can also use the smart template as follows:
Assign ("title", "Hello World! "); $ Content = $ t-> fetch (" templates/index.htm "); // Here, fetch () is the function for obtaining the Output content. in the $ content variable, $ fp = fopen ("archives/2005/05/19/0001 .html", "w"); fwrite ($ fp, $ content ); fclose ($ fp);?>
Easy to use.