Home >Backend Development >PHP Tutorial >getimagesize() 读取不到图片信息解决方法

getimagesize() 读取不到图片信息解决方法

WBOY
WBOYOriginal
2016-06-13 12:26:573308browse

getimagesize() 读取不到图片信息


电脑浏览器,安卓手机浏览器,苹果微信,都可以正常访问
唯独安卓版微信提示错误,经过输出信息后,发现  $info 是空的,也就是说getimagesize() 获取不到图片信息

       //获取图像信息

        $info = getimagesize($imgname);

        //检测图像合法性
        if(false === $info || (IMAGETYPE_GIF === $info[2] && empty($info['bits']))){
            throw new Exception('非法图像文件');

        }

求各位大神来指导了
------解决思路----------------------
$imgname这个的值是什么
------解决思路----------------------
你总得确认他存在吧?

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