passing session id via url

前端 未结 5 1350
逝去的感伤
逝去的感伤 2020-12-03 23:26

I\'m trying to get my script to use url session id instead of cookies. The following page is not picking up the variable in the url as the session id. I must be missing some

5条回答
  •  [愿得一人]
    2020-12-04 00:19

    Just a little correction ... Don't forget to check param if it exists. This worked for me well.

    if (isset($_GET['PHPSESSID'])) {
      session_id($_GET['PHPSESSID']);
    }
    session_start();
    

提交回复
热议问题