当前位置:网站首页>【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边栏推荐
- J3: redis master-slave replication
- 首席信息官引导业务变革的指南
- Pychart loads CONDA to create a pytorch virtual environment and reports an error. It is normal on the CONDA command line
- [yolov5] - detailed version of training your own dataset, nanny level learning, logging, hand-in-hand tutorial
- The authentication type 10 is not supported
- Test interview question set UI automated test
- Principle analysis and source code interpretation of service discovery
- 什么是联邦图机器学习?弗吉尼亚大学最新《联邦图机器学习:概念、技术和应用》综述
- Detailed explanation of MySQL master-slave replication configuration
- Several ways to view containers
猜你喜欢

手机app测试用例怎么写?手机app测试点有哪些?

C#获取本地时间/系统时间

关于接口测试你想知道的都在这儿了

What do indicators and labels do

彻底关闭win10自动更新

eadiness probe failed: calico/node is not ready: BIRD is not ready: Error querying BIRD: unable to c

C # get local time / system time

C # upper computer development - modify the window icon and exe file Icon

Advantages of advanced anti DDoS IP in Hong Kong and which industries are suitable for use

Chapter 9 practical modeling technology
随机推荐
微信小程序插件--wxml-to-canvas(生成图片)
File depth monitoring strategy
亲力亲为的思考
2022牛客多校联赛第三场 题解
服务发现原理分析与源码解读
C language - Introduction - syntax - string (11)
Chapter 9 practical modeling technology
Solidity中call函数详解
CIO guide to business change
Fair lock process of reentrantlock learning
Weekend highlights review | establishment of digital RMB industry alliance; China Mobile announced that hefeixin will stop its service
Familiarize you with the "phone book" of cloud network: DNS
C # get local time / system time
Software process that testers must know
YOLO V2详解
IJCAI2022开会了! Brescia等《证据推理和学习》教程,阐述其最新进展,附96页Slides
Aof & RDB of J2 redis
浅析接口测试
Spatiotemporal prediction 4-graph WaveNet
C # create and read dat file cases