简体   繁体   English

苗条的框架会议

[英]Slim Framework Sessions

Is there a middleware for sessions in PHP Slim Framework? PHP Slim Framework中是否存在用于会话的中间件? If not, is there a lightweight session library that works well with the Slim Framework? 如果不是,是否有一个轻量级的会话库与Slim Framework兼容? Its important that the library supports session storage in a database (MySQL). 库必须支持数据库(MySQL)中的会话存储,这一点很重要。

Slim session manager package can be used. 可以使用苗条的会话管理器软件包。 It's available at: 可在以下位置获得:

https://github.com/yusukezzz/slim-session-manager https://github.com/yusukezzz/slim-session-manager

  1. Composer based installation 基于Composer的安装
  2. Slim middleware 苗条的中间件
  3. Can be used with any database driver 可以与任何数据库驱动程序一起使用

Hope it helps. 希望能帮助到你。

PHP native sessions can be database backed. PHP本机会话可以由数据库支持。

PHP sessions in Database 数据库中的PHP会话

It's pretty easy to use native PHP sessions, not sure why you'd need a library. 使用本机PHP会话非常容易,不确定是否需要使用库。

According to their Session Docs , they only have 根据他们的会话文档 ,他们只有

  • Native Session Store 本机会话存储
  • Cookie Session Store Cookie会话存储

It doesn't appear to have a database backed session. 它似乎没有数据库支持的会话。 Maybe its in development or maybe there is a 3rd party plugin for it. 可能正在开发中,或者可能有第三方插件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM