前一个 下一个 编辑 重命名 撤销 搜索 管理
is used for managing sessions.
What is a session?
A session allows you to keep the value of variables between two HTTP requests.
A session is a collection-like container identified by an arbitrary unique string
returned by the Session.Id property
has the following form: <PREFIX>:<KEY>
- <PREFIX> is the prefix set to the Session.Prefix property, or the client IP address if no prefix is set.
- <KEY> is a 24 hexadecimal digits random number.
For example: 10.254.3.151:CFA76E086C00E18CF07A8EC
The session identifier is stored in a cookie named 'SESSION' in the client browser.
Storing values in session
The session can store values associated with string keys. You can store as many values as you want,
but there are restrictions: only native datatypes, arrays, and collections can be used.
The session contents are stored in the following file:
"/tmp/gambas" &/ System.User.Id &/ "session" &/ Session.Id
The session is automatically restored at program launch.
A newly session is automatically created as soon as you store a session variable
, and no session currently exists
You can abandon a session by using the Abandon method