Ale*_*x V 35 php output-buffering
ob_clean()和之间有什么区别ob_flush()?
还有什么区别ob_end_clean()和ob_end_flush()?我知道ob_get_clean()并且ob_get_flush()都获得内容和结束输出缓冲.
Ada*_*ner 53
该*_clean变种刚清空缓冲区,而*_flush功能打印的内容是在缓冲区(发送内容到输出缓冲).
ob_start();
print "foo"; // This never prints because ob_end_clean just empties
ob_end_clean(); // the buffer and never prints or returns anything.
ob_start();
print "bar"; // This IS printed, but just not right here.
ob_end_flush(); // It's printed here, because ob_end_flush "prints" what's in
// the buffer, rather than returning it
// (unlike the ob_get_* functions)
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
29259 次 |
| 最近记录: |