This article records the session in the Main.php configuration options, only to record, because Yii itself session, has been encapsulated very strong, but too tough, also unavoidably lost a lot of details.
For detailed documentation please refer to: http://www.yiiframework.com/doc/api/1.1/CDbHttpSession
protected/config/main.php
//Application Components
' components ' => array (
' session ' => array (
' class ' => ' chttpsession ',
' AutoStart ' => true,
' SessionID ' => ' Site session ID ',
' SessionName ' => ' Site session Name ',
' Savepath ' => '/path/to/session ',
' cookiemode ' => ' Allow ',
' Cookieparams ' => Array (
' domain ' => ' soyoung.com ',
' path ' => '/path/to/cookie ',
' httponly ' = > True
),
' timeout ' => 1440,
' gcprobability ' => 1,
' Usetransparentsessionid ' => true< c17/>),
Some property configuration items are listed here, which are detailed below to understand:
Class This property stores session AutoStart whether Session_Start () is turned on (), the default is true, and if False, the open () SessionID is set to the current session ID, that is, execution session_id () SessionName sets the current session Name, which executes Session_name (), defaults to PHPSESSID Savepath sets the save path for the session on the server, defaults to/tmp Cookiemode Set the cookie mode, which can set three values, Allow/none/only,allow allows Cookie;none to be used cookie;only only cookies are allowed. The default is allow Cookieparams Set cookie mode parameter timeout set a few seconds after the reply is idle, the default is 1440 gcprobability set garbage collection probability, the default is 1, that is 1% Usetransparentsessionid to set whether each page has a session ID
For action session, please search Google.
Remark: This article is original, reprint please mark the origin in the beginning ...