Online user count statistics of php imitation aspApplication objects

Source: Internet
Author: User
? Php * usage: application (#39; key #39;, #39; value #39;); set keyvalue...
 2 | count ($ args) <1) return; $ ssid = session_id (); // save the current session_id session_write_close (); // end the current session ob_start (); // disable the global session from sending the header session_id ("xxx"); // register the global session_id session_start (); // enable the global session $ key = $ args [0]; if (count ($ args) = 2) // if the second parameter exists, it indicates that the global session is written {$ re = ($ _ session [$ key] = $ args [1]);} else // if there is only one parameter, returns the value {$ re =$ _ session [$ key];} session_write_close (); // ends the global session session_id ($ ssid ); // re-register the non-global session session_start () interrupted above; // re-enable ob_end_clean (); // discard some headers generated due to session_start and output return $ re ;}


Link to this article:

Add to favorites ^ please keep the tutorial address.

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.