例如:
$url="https://cache.yisu.com/upload/information/20201209/266/39665.png"; print_r(getimagesize($url));
输出的结果为:
Array ( [0] => 550 [1] => 190 [2] => 3 [3] => width="550" height="190" [bits] => 8 [mime] => image/png )
再来看一个获取flash文件尺寸的例子:
$url="http://tools.jb51.net/static/api/data/e69b9944a2ce0afc9890f85f10dbcfc3.swf"; print_r(getimagesize($url));
输出结果如下:
Array ( [0] => 540 [1] => 250 [2] => 13 [3] => width="540" height="250" [mime] => application/x-shockwave-flash )
上一篇:Yii2中如何实现单元测试
下一篇:python中hash算法可逆吗