英[stɑ:t] US[stɑ:rt]
n.Start; set off; start; starting point
vt.& vi. Depart, set off
vt. Start; raise (question); start; make start
vi.Start; suddenly appear; suddenly jump up; suddenly gush out
Third person singular: starts Present participle: starting Past Formula: started Past participle: started
php session_start() function syntax
Function:Start a new session or reuse an existing session
Syntax: bool session_start ([ array $options = [] ] )
Parameters:
Parameters | Description |
options | This parameter is an associative array. If provided, the items in it will be used to overwrite the configuration items in the Session Configuration Instructions. The keys in this array need not contain the session. prefix. |
Explanation: Returns TRUE if the session is successfully started, otherwise returns FALSE
php session_start() function example
<?php session_start(); session_id(1); session_name("admin"); echo "session_id:".session_id().",session_name:".session_name(); ?>
Run instance?
Click the "Run instance" button to view the online instance
Output:
session_id:1,session_name:admin
<?php session_start(); session_id(2); session_name("php中文網(wǎng)"); echo "當(dāng)前存儲的sessionid為".session_id().",存儲的session名為:".session_name(); ?>
Run Instance?
Click the "Run Instance" button to view the online instance
Output:
當(dāng)前存儲的sessionid為2,存儲的session名為:php中文網(wǎng)