Home > Backend Development > PHP Tutorial > About the enhanced use of callback ob_start() function_PHP tutorial

About the enhanced use of callback ob_start() function_PHP tutorial

WBOY
Release: 2016-07-13 10:50:54
Original
903 people have browsed it



Question
About the enhanced use of callback functions.
Solution
When the program structure is complex, with many introductions and irregular references. If there is an echo 'aaaa'; in a certain file, it will affect the program output.

function ob_gzip($content)

How to determine if the program has echo print and any non-html output in such a callback function?


Reference answer
Try not to output content in the callback function. My common.class.php file of more than ten kilobytes does not even have a space in it to avoid problems when calling.
Reference answer
Make regular quotes.
Single entrance, shallow structure
Reference answer
I want to limit the echo output... It must be output in html... to ensure that the program can be executed under healthy conditions...
Reference answer
ob_start()
This is what we do
Reference answer
Write a function for me...
Reference answer
The grass bird learned
Reference answer
Hahaha, learned
Reference answer
Just start the file directly ob_start(); and that’s it
Reference answer
ob_start(); Now I have it, but I still can’t tell when the echo occurs and how to abort it..

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/632602.htmlTechArticle Question about the enhanced use of callback functions. Solution: When the program structure is complex, with multiple introductions and irregular references. There is an echo 'aaaa'; in a certain file which will affect the program output...
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template