Home  >  Article  >  Backend Development  >  How to clear php cache

How to clear php cache

爱喝马黛茶的安东尼
爱喝马黛茶的安东尼Original
2019-09-24 16:01:435777browse

How to clear php cache

Create a new PHP file and turn on the caching function of the output control, for example:

<?php
ob_start();

How to clear php cache

Put the first output into to cache control, for example:

echo &#39;first cache&#39;;

How to clear php 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.

How to clear php cache

Use the ob_flsh() function to output the cache content and clear the cache, for example:

ob_flush();

How to clear php cache

How to clear php cache

ob_clean() function will clear the contents of the cache area and will not output, for example:

ob_clean();

How to clear php cache

How to clear php cache

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!

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
Previous article:What are the php caches?Next article:What are the php caches?