PHP Sessions with disabled cookies, does it work?

前端 未结 9 1850
暖寄归人
暖寄归人 2020-11-28 03:58

Today I had skype interview for a job as PHP developer, one of the questions asked was about Cookies and PHP Sessions.

The question was, can PHP session be set and r

9条回答
  •  北荒
    北荒 (楼主)
    2020-11-28 04:25

    If it was me, I would say "Yes"

    Since you could store session in form / url somewhere to passed to next page (very bad idea). So, based on his question "can PHP session be set and read, used, if Cookies are disabled in users Browser?"

    Then, it should be yes. It can read and used.

    However, If user close browser, then it's gone, and that's it. (since that guy didn't ask about this part)

提交回复
热议问题