PHPsu
MANUAL ZH  |  EN
     


Current Position :| index>PHP FUNCTION> PHP: session_id

PHP: session_id

FROM: AUTHOR: TIME:2008-04-06 HITS:

session_id

(PHP 4, PHP 5) welcome to phpsu.com

session_id -- Get and/or set the current session id

Description

string session_id ( [string id] )

session_id() is used to get or set the session id for the current session. phpsu is a phpschool

The constant SID can also be used to retrieve the current name and session id as a string suitable for adding to URLs. See also Session handling.

welcome to phpsu.com

Parameters

www.phpsu.com

id

If id is specified, it will replace the current session id. session_id() needs to be called before session_start() for that purpose. Depending on the session handler, not all characters are allowed within the session id. For example, the file session handler only allows characters in the range a-z, A-Z and 0-9!

welcome to phpsu.com

Note: When using session cookies, specifying an id for session_id() will always send a new cookie when session_start() is called, regardless if the current session id is identical to the one being set. phpsu.com

phpsu is a phpschool

Return Values

session_id() returns the session id for the current session or the empty string ("") if there is no current session (no current session id exists).

welcome to phpsu.com

See Also

http://www.phpsu.com

session_regenerate_id()session_start()session_set_save_handler() session.save_handler >

phpsu.com is a free phpscool

phpsu.com is a free phpscool


TITLE:PHP: session_id
Copyright 2008 The PHPsu All rights reserved. This mirror generously provided by: .Hp Inc.
Last updated: Fri Jun 6 22:47:03 GMT-8 2008