开发者

Does $_POST have a size limit? [duplicate]

开发者 https://www.devze.com 2023-04-08 11:42 出处:网络
This question already has answers here: Closed 11 years ago. Possible Duplicate: What is the size limit of a post request?
This question already has answers here: Closed 11 years ago.

Possible Duplicate:

What is the size limit of a post request?

Does $_POST when used in conjunction with forms in PHP have a size limit? Obviously there must be some restrictions with $_GET seeing as most browsers will start to complain at ~250 characters (or something lik开发者_如何学Ce that) and data could be lost, obviously this restraint doesn't apply to $_POST.

I could test it myself but thought it might be quicker to simply ask here. If I had a simple form with a textarea, how much data could I enter before I ran into problems?


That depends on the value of the PHP configuration directive POST_MAX_SIZE which is usually set to 8 MB (~8 million characters).


Yes it has limitation, you can set the limit from several place:

1., in php.ini

post_max_size="8M"

2., from the .htaccess file, if you have

php_value post_max_size 8M 

3., from php side,

ini_set('post_max_size',"8M")


yes,

you can change limit from php.ini "post_max_size"


It's a PHP ini directive, post_max_size. It defaults to 8MB.


Yes. It's defined in the php.ini file.


Yes the POST data is regulated by the post_max_size variable (default to 8M)

0

精彩评论

暂无评论...
验证码 换一张
取 消