Home >Backend Development >PHP Tutorial >Instructions for parsing PHP cache functions_PHP tutorial
flush(): refresh the output program cache
for($i = 0; $i < 5; $i++){
echo str_repeat("n", 5000);
echo $i;
sleep(1);
flush();
}
ob_start(callback function, Limited length, output cache = 'true' at any time): On, premise: output_buffer = on
ob_clear(): Refresh
ob_end_clear(): Close, and refresh
ob_flush(): Output
ob_end_flush (): Close and output
ob_get_contents: Return to cache
ob_get_clean(): Return to cache and refresh
ob_get_flush(): Return to cache and close
ob_get_length(): Return to cache Content length
ob_get_level(): Returns the cache nesting level
ob_get_status (returns all = false): Returns the buffer status
ob_gzhandler(): Compresses the output cache, used as callback function: ob_start ('ob_gzhandler')
ob_implicit_flush(output refresh=true): When the parameter is true, the cache will be automatically refreshed every time the output is cached
ob_list_handlers(): List all functions that are using the cache.
output_add_rewrite_var(variable, value): Add the value of the URL rewriter. This function adds a name/value pair to the URL rewriting mechanism. This name-value pair will be added to URLs (in the form of GET parameters) and forms (in the form of input hidden fields), and can also be added to the session when transparent URL
rewriting is enabled with session.use_trans_sid ID. Absolute URLs (http://example.com/) are not rewritten, and the function behavior is controlled by the url_rewriter.tags php.ini parameter
output_add_rewrite_var('var', 'value');
echo ' can be rewritten'; //After rewriting: link
echo 'link2';//Absolute addresses are not rewritten
echo '