开发者

PHP How to find maximum allowed POST data?

In PHP, is there a quick way to find th开发者_Python百科e maximum allowed size of POST data for any server configuration that my script is run on?

For example, $max_post_length = $_SERVER['maxpost']; or something. Perhaps it would return 0 for 'no limit'...any ideas?


Use ini_get.

ini_get('post_max_size');


Try this:

echo ini_get('post_max_size');

Or translate it to bytes:

echo (int)(str_replace('M', '', ini_get('post_max_size')) * 1024 * 1024);
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜