Session function of php4 (III ). The general feeling is that the session function of php can still be used, which is quite convenient and saves a lot of trouble for processing cookies. Php session management is still based on files. by default, it is quite convenient to use php session functions, saving a lot of processing.
Cookie troubles. Php session management is based on files. the default value is in the/tmp directory.
Generate a session file with the same name as the session id. in this file, save
Session data. The session has a lifetime, which can be set in/usr/local/lib/php. ini.
Efficiency should be very sloppy. after all, file operations are still required, although it is/tmp. Great service volume
Large applications will generate many session files in/tmp...
What about distributed applications? How many web servers serve together? Here is the session file directory.
It is configurable. it is all about getting all session files to a shared nfs directory. However, php
Have you considered nfs special processing when generating a unique file? I did not go over the source code carefully.
Problems, although the probability is very small...
Instead, you can create a session keeper's damon, and the session data can be stored in a hash table.
Store the data in the memory and run the udp service (high efficiency, low loss rate in lan) to generate the session.
, Retrieval, end, and retrieval of session variables, so that multiple web servers can share
Session information. I have done both the functions on the server and the client. Now the question is how to send the client's letter
Add the number to php, or how does php support dynamic library function calling? in manual
There are no relevant examples.
BTW: due to the not strict syntax, php function return is prone to ambiguity, such as strpos, no
0 is returned for matching, but the position of matching may be 0, faint ~...
The trouble of cookie refreshing. Php session management is based on files. the default value is /...