Home  >  Article  >  Backend Development  >  Can the ob_end_flush() method in PHP be used without ob_start()?

Can the ob_end_flush() method in PHP be used without ob_start()?

WBOY
WBOYOriginal
2016-10-11 14:23:361186browse

If the program does not use ob_strat() to open the buffer, what will be the effect of using ob_end_flush() directly later? Does it have the same effect when used together with ob_start()?

Reply content:

If the program does not use ob_strat() to open the buffer, what will be the effect of using ob_end_flush() directly later? Does it have the same effect when used together with ob_start()?

ob_start() and ob_end_flush() can control the output when used in pairs.
ob_strat() opens the buffer, ob_end_flush() outputs the buffer content and closes the buffer.
ob_end_flush is invalid when used alone.

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