Caching technology
<?php ob_start();//开启缓存 // $c//从缓存中获取内容 $c//localhost/weizhuan/detail.php?aid=349&uid=1534'); 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.