PHPlib
Thursday, August 28, 2008  
download | documentation | faq | changelog | resources 


search for in the  


previousSession Instance methods
Using "auto_init"next

Last updated: Thu, 04 Jul 2002
view this page in Plain HTML

Use a subclass to provide the appropriate parameters to your session. Usually your subclass looks like this:

Remember that you have to provide a DB_Sql subclass with the parameters needed to access your database.

Use the page management functions (see above) to use your session subclass. The feature name for session management is sess; provide the name of your session subclass as a parameter to the sess feature:

Use the register() instance method to register variables as persistent. If $sess is your session object, use

to make the global variable $s persistent. $s may be a scalar value, an array or an object with persistence support slots.

Do not use the instance methods freeze() and thaw() directly, but use the page management functions instead.

To have some pages cached and others not cached, use multiple instances of the session object. For example, for those pages that should be cached, use a session object instance like

Be careful when using the public cache option. Publically cached pages may be accessible to unauthenticated users. The private cache option prevents unauthenticated access, but is only functional in HTTP/1.1 browsers.


User Contributed Notes
Session Examples
add a note about notes
There are no user contributed notes for this page.


previousSession Instance methods
Using "auto_init"next

Last updated: Thu, 04 Jul 2002



 

PHP Copyright © 2001 The PHPlib Group
All rights reserved.
Last updated: Thu Jul 4 15:34:12 2002 IST
Hosted and Maintained by http://www.sanisoft.com