Home >Backend Development >PHP Tutorial > 求php获取远道图片的高和宽

求php获取远道图片的高和宽

WBOY
WBOYOriginal
2016-06-13 13:12:15761browse

求php获取远程图片的高和宽
求php获取远程图片的高和宽
如图片http://www.phpzy.com/logo.jpg
php如果获取高和宽

------解决方案--------------------

PHP code
<?php $path="http://www.phpzy.com/logo.jpg";
$info = getimagesize($path);
echo $info[0]."<br>";//宽度
echo $info[1];//高度
?> <div class="clear">
                 
              
              
        
            </div>
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn