简体   繁体   English

使用平面文件或MySQL的PHP​​中是否有任何分离/独立的会话库?

[英]Any detached/independent Session Library in PHP using Flat File or MySQL?

使用平面文件或MySQL的PHP​​中是否有任何分离/独立的会话库?

Zend_Session would probably do it. Zend_Session可能会做到。 and Zend_Session_SaveHandler_DbTable there is also a save handler for flat file I believe. Zend_Session_SaveHandler_DbTable还有一个我相信的平面文件保存处理程序。

In addition to using Zend_Session or any of these PEAR packages it is also pretty easy to write your own Session Handling. 除了使用Zend_Session这些PEAR包中的任何一个之外,编写自己的会话处理也很容易。 All you have to do is implement the required methods. 您要做的就是实现所需的方法。 See the example for session_set_save_handler in the PHP Manual . 请参阅《 PHP手册》中的session_set_save_handler的示例。

As of PHP5.3 you could implement the callbacks with lambdas, so you don't have to clutter the global namespace with functions. 从PHP5.3开始,您可以使用lambdas实现回调,因此您不必使用函数来使全局名称空间混乱。

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

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