[英]How to share Session between Web Application (Core PHP) and another Web Application (Laravel) on Same Server?
I have a web application built on Core PHP and there is a need to build complex module which is decided to be build on Laravel 5.7. 我有一个基于Core PHP的Web应用程序,需要构建复杂的模块,该模块决定在Laravel 5.7上构建。 What I need is without login twice same user should be able to access Core PHP module and Laravel module. 我需要的是无需登录两次,同一用户应该可以访问Core PHP模块和Laravel模块。
Laravel allows several session drivers such as file
or database
. Laravel允许使用几种会话驱动程序,例如file
或database
。 If both applications share the file location or database table, it could be possible for them to share the session. 如果两个应用程序共享文件位置或数据库表,则它们可能共享会话。
More information about drivers can be found in the documentation: https://laravel.com/docs/5.7/session#configuration 有关驱动程序的更多信息,请参见文档: https : //laravel.com/docs/5.7/session#configuration
FYI: It will not be easy to do this, and sessions are not supposed to work like this. 仅供参考:做到这一点并不容易,并且会议不应该这样工作。 A better way would be to use a central login system. 更好的方法是使用中央登录系统。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.