当前位置: 动力学知识库 > 问答 > 编程问答 >

In a php.ini file there is '2M' where I expect a number - what does it mean?

问题描述:

My employer needs a change to some PHP files that lead me to need to look in the 'php.ini' file which I have never done before. The line I care about is:

upload_max_filesize = 2M

Does '2M' mean 2 million? If not, what does it mean? I don't need to change it, I just need to know what number it represents.

网友答案:

This is a PHP shorthand byte value. You can find out more from http://www.php.net/manual/en/faq.using.php#faq.using.shorthandbytes

网友答案:

2 megabytes. I don't know if that's 2^20 bytes or 10^6 bytes, but that doesn't really make much of a difference.

网友答案:

2M is 2 megabytes (2*1024*1024)

You can read about it here and here

网友答案:

2M=2*2^10 BYTES . This is the default MAX SIZE for UPLOAD defined by PHP , which can be changed to any number you like

分享给朋友:
您可能感兴趣的文章:
随机阅读: