问题描述:

What is maximum value size for php session's and cookie's? that is maximum how much byte can put in him

$_SESSION['key'] = "here what maximum bytes are possible";

$_COOKIE['key'] = "here what maximum bytes are possible";

网友答案:

$_SESSION you can save unlimited amount of data, no real limit for that...

$_COOKIE is I guess under 4000 bytes...(Includes date, name, value, expiry)

网友答案:

I don't think it's a great idea to use a session to store a huge amount of information in it. You can however, store as much as information as you want in a session since it's just a file that is stored on the server. But if you want to store information in a high-scale amount, such as text for example, I would recommend you to use a database. And never store images as blobs in a database since it will just overload it.

相关阅读:
Top