Home > Backend Development > PHP Tutorial > php中session_id()的值一般在数据库存什么类型,长度多少?

php中session_id()的值一般在数据库存什么类型,长度多少?

WBOY
Release: 2016-06-06 20:10:20
Original
1316 people have browsed it

php中session_id()的值一般在数据库存什么类型,长度多少?

我现在的存的是char(32)

回复内容:

php中session_id()的值一般在数据库存什么类型,长度多少?

我现在的存的是char(32)

thinkphp 建的表用的是varchar(255)

用varchar吧,我一般会固定MD5(32)或sha1(40) 加密,情况不同,长度不同

通常是varchar(255),这样适用范围比较广,就算session_id的长度改变了也没什么影响。

Related labels:
php
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 Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template