Home  >  Article  >  php教程  >  Why must ob_clean(); be added to the PHP image verification code to display normally.

Why must ob_clean(); be added to the PHP image verification code to display normally.

WBOY
WBOYOriginal
2016-08-31 08:41:011223browse

ob_clean这个函数的作用就是用来丢弃输出缓冲区中的内容,如果你的网站有许多生成的图片类文件,那么想要访问正确,就要经常清除缓冲区。
If you work on an extremely large project with a lot of source and required files, like myself, you will be well-advised to always clear the output buffer prior to creating an image in php.

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:assign()Next article:assign()