当前位置:网站首页>【PHP】将 SESSION 数据保存到 Redis
【PHP】将 SESSION 数据保存到 Redis
2022-07-26 18:38:00 【知其黑、受其白】
阅读目录
1、修改 php.ini
//设置存储类型
session.save_handler = redis
//redis链接 有密码添加?auth=123456
session.save_path = "tcp://127.0.0.1:6379?auth=123456"
//设置自动启动session
session.auto_start = 1
2、保存后重启 apache/nginx
3、链接 redis 客户端查看数据:
4、PHP测试:获取到所有的 session 值
<?php
print_r($_SESSION);
Array
(
[token边栏推荐
- Design of intelligent weighing system based on Huawei cloud IOT (STM32) [II] there is information at the end
- 浅析接口测试
- 服务发现原理分析与源码解读
- LeetCode每日一练 —— 189. 轮转数组
- Machine learning notes - building a recommendation system (6) six automatic encoders for collaborative filtering
- Onion group joined hands with oceanbase to realize distributed upgrading, and global data has achieved cross cloud integration for the first time
- PyQt5快速开发与实战 3.6 打包资源文件
- Leetcode-138-copy linked list with random pointer
- SEO, client rendering ', server rendering, search engine understanding
- To add a composite primary key
猜你喜欢

Description of MDM separation of powers and classification and grading authority

PyQt5快速开发与实战 3.6 打包资源文件

Solidity中call函数详解

Leetcode daily practice - 88. Merge two ordered arrays

How to write the test case of mobile app? What are the mobile app test points?

用低代码搭建千人食品制造企业高效管理系统案例分析
Bug 反馈:同步失败

What is a server cluster? What are the advantages of overseas server clusters?

Sre person in charge of station B personally describes the multi activity disaster recovery construction after the 713 accident | takintalks share

基于华为云 IOT 设计智能称重系统 (STM32)【二】结尾有资料
随机推荐
Wechat applet plug-in -- wxml to canvas (generate pictures)
2022/07/26 学习笔记 (day16) 链表和栈
Image preview embedding location of blog maintenance record
The passwords are consistent, and the total display is as shown in the figure below
Save gas chitoken usage
Leetcode daily practice - 88. Merge two ordered arrays
Software process that testers must know
6种方法帮你搞定SimpleDateFormat类不是线程安全的问题
Without Lin benjian, there would be no TSMC today!
A case study of building an efficient management system for a thousand person food manufacturing enterprise with low code
conda转移项目虚拟环境必备技能+pip速度下载太慢解决办法
How to write the test case of mobile app? What are the mobile app test points?
openstack 虚拟机网卡被重名为cirename0
Save 50% of the cost JD cloud releases a new generation of hybrid CDN products
基于华为云 IOT 设计智能称重系统 (STM32)【二】结尾有资料
TB 117-2013 US Federal mandatory regulations
Spatiotemporal prediction 5-gat
Selenium+Web自动化框架的Case
Data Lake -- concept, characteristics, architecture and case overview
Redis介绍