CodeIgniter sessions vs PHP sessions

后端 未结 5 867
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-08 00:31

I\'m relatively new to CodeIgniter and am making my first CI project in which there are user-accounts, etc. In the past, I have always used PHP\'s $_SESSION variable to this

5条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-08 01:07

    The manual says more flexibility rather than better ;-)

    I presume the main benefit of CodeIgnite session class is that it integrates with the framework and it offers a few extra functionality, such as IP address tracking and what it calls flashdata (session data that's erased as soon as it's read). If you are using a framework in the first place that means these options may be attractive for you.

    Whatever, you can also save session data into a database:

    http://codeigniter.com/user_guide/libraries/sessions.html

提交回复
热议问题