redis為什么默認16個db php實現redis數據庫指定庫號遷移的方法?
php實現redis數據庫指定庫號遷移的方法?具體代碼如下:namespace appindexcontrollerusethinkdbuse thinkcachedriverredisclass i
php實現redis數據庫指定庫號遷移的方法?
具體代碼如下:namespace appindexcontrollerusethinkdbuse thinkcachedriverredisclass index{public function index(){$config=[“host”=>“server IP address”,“port”=>端口號,“password”=>“redis access password”,“select”=> 0,“timeout”=> 0,“expire”=> 0,“persistent”=> false,“prefix”=>“”,]$Redis=new Redis($config)$Redis->集(“test”,“test”)echo$Redis->集(“test”)}