Create a new PHP file and turn on the caching function of the output control, for example:
<?php ob_start();
Put the first output into to cache control, for example:
echo 'first cache';
Related recommendations: "php tutorial"
Save the above content and run it in the browser Preview, there is no output, the input content has been controlled in the cache area.
Use the ob_flsh() function to output the cache content and clear the cache, for example:
ob_flush();
ob_clean() function will clear the contents of the cache area and will not output, for example:
ob_clean();
The above is the detailed content of How to clear php cache. For more information, please follow other related articles on the PHP Chinese website!