Comment on the session function of PHP4 (III.) _php Foundation
Source: Internet
Author: User
The general feeling of PHP's session function can basically use, but also convenient, save a lot of their own processing
Cookie's troublesome thing. PHP Session Management is also file-based, and the default is in the/tmp directory
Generates a session file with the same name as the session ID, which holds the Register's
Session data. Session has a lifetime, in the/usr/local/lib/php.ini can be set.
Efficiency should be considered so-so, after all, still want to file operations, although it is/tmp. For the service volume is very
Large application will generate a lot of session files in/TMP, special ...
What about distributed applications? How many Web servers are serviced together? The table of contents of the session file
Is configurable, get all the session files to a shared NFS directory. But PHP
Has the special handling of NFS been considered when generating a unique file? I am not careful to see the source code, it is estimated that
Problem, although the chance is very small ...
You can do a session. Keeper Damon,session data can be stored in the form of a hash table
stored in memory, the UDP service mode (high efficiency, small packet loss within the LAN) to complete the session of life
To, retrieve, end, take the session variable and so on, so that multiple Web servers can share
Session information. Server and client functions I did, and now the question is how to put the client's letter
Number added to PHP, or PHP support for dynamic library function calls how about these things manual
Faces are not exhaustive, there are no relevant examples.
BTW: Because of the syntax is not strict, PHP function return is easy to cause two semantic, such as Strpos, no
The match returns 0, but the matching position may be 0, faint~ ...
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.