Home > Backend Development > PHP Tutorial > Instructions for parsing PHP cache functions_PHP tutorial

Instructions for parsing PHP cache functions_PHP tutorial

WBOY
Release: 2016-07-21 15:11:05
Original
1002 people have browsed it

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 '

'; //After rewriting:


output_reset_rewrite_vars(): Reset the value of the URL rewriter, returning true successfully

output_add_rewrite_var('var', 'value' ; ="file.php">Not to be rewritten';//Reset, the address will not be rewritten


http://www.bkjia.com/PHPjc/326989.html

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/326989.htmlTechArticleflush(): 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 at any time = 'true'): open...
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