Show
Ignore:
Timestamp:
01/18/06 09:20:02 (3 years ago)
Author:
gerd
Message:

- Code cleanup
- Feature "id-prefix" added
- Access basic information as property

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/patSession2/examples/example_basic_options.php

    r15 r40  
    1212 * @license LGPL 
    1313 **/ 
    14         error_reporting( E_ALL ); 
    15          
    16         // include error-manager 
    17         include_once '../../patError/patErrorManager.php'; 
    18          
    19         patErrorManager::setErrorHandling( E_ERROR, 'verbose' ); 
     14    // load error handler 
     15    include_once './_error.php'; 
    2016         
    2117        // include factory/loader 
     
    2420         
    2521        $options        =       array( 
    26                         'name'                          =>      'patSession', 
    27                         'id'                            =>      'VERY0STRANGE0SESSION0ID', 
     22                        'name'                          =>      'psid', 
     23                        'id'                            =>      'VeryStrangeSessionId', 
     24            'id-prefix'         =>  '01x', 
    2825                        'expire'                        =>      5, 
    2926                        'security'                      =>      'fix-browser,fix-ip,fix-referer', 
     
    4037        <ul> 
    4138                <li> 
    42                         <b>name:</b> internal session name 
     39                        <b>name:</b> session name 
    4340                </li> 
    4441                <li> 
    45                         <b>id:</b> use a custom session id 
     42                        <b>id:</b> use a custom session id<br /> 
     43            You hardly use this. 
    4644                </li> 
     45        <li> 
     46            <b>id-prefix:</b> prefix to be added to each session id<br /> 
     47            E.g. you want to add the server's id 
     48        </li> 
    4749                <li> 
    4850                        <b>expire:</b> maximum idle timeout 
     
    7072        // get query string 
    7173        echo '<br/>Recieve session-query-string, this can be used like the PHP-constant "SID"<br />'; 
    72         $queryString    =       $sess->getQueryString()
     74        $queryString    =       $sess->SID
    7375        echo 'Query-string <i>' . $queryString . '</i> from this session.<br />'; 
    7476        echo 'This <a href="' . $_SERVER['PHP_SELF'] . '?' . $queryString . '" title="'. $_SERVER['PHP_SELF'] . '?' . $queryString .'">URL</a> contains the query-string<br />';