I want to know how many Kb,Mb an image is by PHP
收起
当前问题酬金
¥ 0 (可追加 ¥500)
支付方式
扫码支付
支付金额 15 元
提供问题酬金的用户不参与问题酬金结算和分配
支付即为同意 《付费问题酬金结算规则》
Use the filesize function:
$size = filesize('image.jpg'); // Returns size in bytes
To find out the size in Kilobytes or Megabytes:
$size_in_kb = round($size / 1024, 2); $size_in_mb = round($size / (1024 * 1024), 2);
报告相同问题?