Session_Start (): Starts a session or returns a session that already exists.
Note: This function has no parameters and the return value is true. If you use a cookie based session (cookie-based sessions), the browser cannot have any output before using session_start (), or the following error occurs:
Warning:cannot Send session Cache Limiter-headers already sent (output started AT/USR/LOCAL/APACHE/HTDOCS/CGA/MEMBER/1 . php:2) ......
You can start the session.auto_start=1 in php.ini so you don't need to invoke session_start () every time you use the session. However, there are some limitations on enabling this option, and if Session.auto_start is enabled, you cannot put the object into a session because the class definition must be loaded before the session is started to rebuild the object in the session.
All registered variables are serialized after the end of the request. A variable that is registered but undefined is marked as undefined. These variables are also not defined by the session module in subsequent accesses, unless they are defined later by the user.
Warning: Some types of data cannot be serialized and therefore cannot be saved in a session. Includes resource variables or objects that have circular references.
Register Session Variable:
PHP5 registers the session global variable with the $_session[' xxx ']=xxx. It is similar to the way Get,post,cookie is used.
Note: Session_register (), Session_unregister, session_is_registered are no longer used under PHP5 unless the php.ini is set to on in Register_globle, However, for security reasons, it is strongly recommended that register_globle be closed. Http_session_vars also does not advocate the use, the official proposal uses $_session to replace it.