PHP: whats the total length of a post global variable?

前端 未结 4 975
Happy的楠姐
Happy的楠姐 2020-12-03 04:45

I was wondering if anybody knows the total length that a post global could be. e.g:

$_POST[\'formInput\'] = \"hello world, how long can i be?\";
4条回答
  •  自闭症患者
    2020-12-03 05:29

    Check your php.ini for post_max_size. This is typically about 8mb by default, but if you're on shared-hosting, it could definitely vary.

    ; Maximum size of POST data that PHP will accept.
    post_max_size = 8M

    You'll have to use $_POST if you wish to send large amounts of data to the server. For further study, I'd suggest checking out POST Method Uploads in the documentation.

提交回复
热议问题