I'm trying to pass the value of session id via get (url) and not via cookies. My configuration of php.ini is:
session.use_cookies = on session.use_only_cookies = off session.use_trans_sid = on
Normally (always) the cookie are ENABLED in the user's browser, so if i try to pass the sid via url: www.site.com/?phpsessid=abc it doesn't work, because the constant SID (http://www.php.net/manual/en/session.idpassing.php) remain empty and the session work with $_COOKIE['PHPSESSID'].
If the cookie are manually DISABLED the session work with SID.
My question is: can i use the SID via get with cookies enabled? Maybe there is some php开发者_Go百科.ini configurations that i unknow....
thx :)
It will be in $_GET
or $_COOKIES
. You could use $_REQUEST['PHPSESSID']
to always get it.
But why do you need it? If you are using sessions, you pass your data around in in $_SESSION
, and don't worry about the session id.
精彩评论