? 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.