php的GetimageSize函数获取图像的高度,宽度和上载图像的mime类型不适用于iPhone肖像图像。它可以将图像的高度设置为width参数,反之亦然。但是对于横向图像来说,它可以正常工作。
<?php $size = getimagesize($filename); $fp = fopen($filename, "rb"); if ($size && $fp) { header("Content-type: {$size['mime']}"); fpassthru($fp); exit; } else { // error } ?>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.