【发布时间】:2013-01-31 23:11:04
【问题描述】:
可能重复:
How to get image resource size in bytes with PHP and GD?
是否可以使用 php 获取对象 $image 的文件大小(不是图像大小尺寸)?我想将此添加到我的“Content-Length:”标题中。
$image = imagecreatefromjpeg($reqFilename);
【问题讨论】:
-
您应该阅读更多关于php.net/manual/en/ref.outcontrol.php 的信息,例如
ob_start()、ob_clean()、ob_flush()等