Home >Backend Development >PHP Tutorial >Generate html PHP crawl page to generate HTMl file simple code

Generate html PHP crawl page to generate HTMl file simple code

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-07-29 08:42:071502browse

Caching technology

<?php
	ob_start();//开启缓存
   // $c//从缓存中获取内容
	$c//localhost/weizhuan/detail.php?aid=349&uid=1534&#39;);
    ob_end_clean();//关闭缓存并清空
    /***缓存结束***/
    file_put_contents("ceshi2.html", $content);
    echo $content; 
	echo "ok";
?>

ob_start();//Turn on caching
// $c//Get content from cache
$c//localhost/weizhuan/detail.php?aid=349&uid=1534');
ob_end_clean();//Close cache and clear
/***End of caching***/
file_put_contents("ceshi2.html", $content);
echo $content;
echo "ok";
?>

The above introduces the simple code for generating html and PHP crawling pages to generate HTMl files, including the content of generating html. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn