Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有DB会话处理程序,我有一个FILE会话处理程序和一个REDIS会话处理程序
根据我的引导程序中的一些逻辑,我想在两个会话处理程序中选择一个用于当前请求。
如何?
之前的代码session_start是
session_start
$c= $redis->pconnect('127.0.0.1', 6379); if(!$c || !$redis->ping()){ //do logic to switch to files/db session handler }