为什么 PHP 脚本运行的内存限制最小是 2M 呢? memory_limit 参数已经设置为 1M
資深大佬 : ligthdawn 4
附上脚本
<?php ini_set('memory_limit', '1M'); file_get_contents("/data/www/elasticsearch-7.4.2-linux-x86_64.tar.gz");
读取的文件 elasticsearch-7.4.2-linux-x86_64.tar.gz 200 多 M
报错信息如下 PHP Fatal error: Allowed memory size of 2097152 bytes exhausted (tried to allocate 288783720 bytes)
疑问,为什么设置了脚本运行的内存限制为 1M,但是报错信息是显示 2M 呢
大佬有話說 (4)