Get image height and width PHP

前端 未结 4 925
一整个雨季
一整个雨季 2020-12-30 07:32

Hello I need to get the height and width on the fly of an uploaded image.

This is the PHP function I am using, but it does not return anything for the width and heig

4条回答
  •  我在风中等你
    2020-12-30 08:21

    height: $height";*/
    
    
    
    $testing = "http://heartbeatperformance.com.p9.hostingprod.com/customerphotos/img/logo.png";
    //echo $testing;
    list($width, $height, $type, $attr) = getimagesize($testing);
    echo "Image width " . $width;
    echo "Image height " . $height;
    
    
    
    ?>
    

提交回复
热议问题