Do AJAX requests retain PHP Session info?

前端 未结 8 939
情书的邮戳
情书的邮戳 2020-11-28 18:52

If I had a user logged onto my site, having his id stored in $_SESSION, and from his browser he clicked a \'Save\' button which would make an AJAX request to th

8条回答
  •  南笙
    南笙 (楼主)
    2020-11-28 19:33

    That's what frameworks do, e.g. if you initialize session in Front Controller or boostrap script, you won't have to care about it's initalization either for page controllers or ajax controllers. PHP frameworks are not a panacea, but they do so many useful things like this!

提交回复
热议问题