How can I find the width of an image using PHP?

前端 未结 7 1690
伪装坚强ぢ
伪装坚强ぢ 2020-12-10 15:40

I was wondering how can I find the width of an image using php.

7条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-10 16:21

    Easy, you can use getimagesize:

    list($width, $height) = getimagesize($filename);
    

提交回复
热议问题