简体   繁体   English

在php.ini文件中,我需要一个数字“ 2M”-这是什么意思?

[英]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. 我的雇主需要更改一些PHP文件,这使我需要查看以前从未做过的'php.ini'文件。 The line I care about is: 我关心的行是:

upload_max_filesize = 2M

Does '2M' mean 2 million? “ 2M”是指200万吗? If not, what does it mean? 如果不是,那是什么意思? I don't need to change it, I just need to know what number it represents. 我不需要更改它,我只需要知道它代表什么数字即可。

2 megabytes. 2兆字节。 I don't know if that's 2^20 bytes or 10^6 bytes, but that doesn't really make much of a difference. 我不知道这是2 ^ 20字节还是10 ^ 6字节,但这并没有太大的区别。

This is a PHP shorthand byte value. 这是一个PHP速记字节值。 You can find out more from http://www.php.net/manual/en/faq.using.php#faq.using.shorthandbytes 您可以从http://www.php.net/manual/en/faq.using.php#faq.using.shorthandbytes中找到更多信息

2M is 2 megabytes (2*1024*1024) 2M为2兆字节(2 * 1024 * 1024)

You can read about it here and here 您可以在这里这里阅读

2M=2*2^10 BYTES . 2M = 2 * 2 ^ 10字节 This is the default MAX SIZE for UPLOAD defined by PHP , which can be changed to any number you like 这是PHP定义的UPLOAD的默认MAX SIZE,可以更改为您喜欢的任何数字

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM