Parsing PHP Cache Function usage Instructions _php tutorial

Source: Internet
Author: User

Flush (): Refreshes the output program cache
for ($i = 0; $i < 5; $i + +) {

echo str_repeat ("\ n", 5000);
echo $i;
Sleep (1);
Flush ();
}

Ob_start (callback function, limit length, at any time output cache = ' true '): On, premise: Output_buffer = On
Ob_clear (): Refresh
Ob_end_clear (): Off, and refresh
Ob_flush (): Output
Ob_end_flush (): Off, and output

Ob_get_contents: Return Cache
Ob_get_clean (): Returns the cache and refreshes
Ob_get_flush (): Returns the cache and closes
Ob_get_length (): Returns the cached content length
Ob_get_level (): Returns the cache nesting level
Ob_get_status (Return all =false): Return to buffer state

Ob_gzhandler (): Compressed output cache, used as callback function: Ob_start (' Ob_gzhandler ')
Ob_implicit_flush (output refresh =true): When the parameter is true, the cache is automatically refreshed each time the output is cached
Ob_list_handlers (): Lists all functions that are using the cache.


Output_add_rewrite_var (variable, value): Adds a URL rewrite to this function to add a name/value pair to the URL rewrite mechanism. This name value pair will be added to the URL (in the form of a Get parameter) and form (in the form of a hidden field in input) when the transparent URL

Overrides can also be added to the session ID when Session.use_trans_sid is turned on. The absolute URL (http://example.com/) is not overridden, and the function behavior is controlled by the url_rewriter.tags php.ini parameter

Output_add_rewrite_var (' var ', ' value ');
echo ' can rewrite '; After rewriting: Link
Echo ' link2 ';//absolute Address not rewritten
Echo '; After rewriting:

Output_reset_rewrite_vars (): Resets the value of the URL rewrite and returns true successfully

Output_add_rewrite_var (' var ', ' value ');
Echo ' is not rewritten ';
Output_reset_rewrite_vars ();//Reset
Echo ' not rewritten ';//reset, Address not rewritten

http://www.bkjia.com/PHPjc/326989.html www.bkjia.com true http://www.bkjia.com/PHPjc/326989.html techarticle Flush (): Refreshes the output program cache for ($i = 0; $i 5; $i + +) {echo str_repeat ("\ n", Ob_start), Echo $i; sleep (1); flush ();} (callback function, limited length Output cache at any time = ' true '): Open ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.