Home > php教程 > php手册 > 对官方的SessionDb驱动稍作改进,可以支持IP验证

对官方的SessionDb驱动稍作改进,可以支持IP验证

WBOY
Release: 2016-06-07 11:43:26
Original
1096 people have browsed it

session 数据库处理方式驱动; 基于ThinkPHP框架并且需要PDO支持和get_client_ip函数支持;可以方便设置配置,加上了一条IP验证
config配置项
SESSION_EXPIRE:session生存时间;SESSION_TABLE:session表名(含前缀的全称);SESSION_UPDATE_DELAY:更新时间延迟,降低性能开销(默认0);
SESSION_GC_PROBABILITY/SESSION_GC_DIVISOR:执行垃圾回收几率;SESSION_USE_TRANS_SID:如果用户不支持cookie是否自动开启URL传递sessionID模式;

session表字段:
id(int);sid(varchar32);ip(varchar15);life_time(int11);update_time(int11);data(text);

附件 xulinyang.com_SessionDb.zip ( 1.98 KB 下载:24 次 )

AD:真正免费,域名+虚机+企业邮箱=0元

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template