php getimagesize解决办法

WBOY
Release: 2016-06-13 12:58:49
Original
1294 people have browsed it

php getimagesize
我在本地用getimagesize很正常,但程序在虚拟主机上就会报错
怎么配置可以使此函数生效,或者有什么替代的具体方法,(我只想抓取到图片的宽度和高度)


Warning: getimagesize() [function.getimagesize]: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in


Warning: getimagesize(http://www.abc.com/aa.jpg) [function.getimagesize]: failed to open stream: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in
------解决方案--------------------
至少需要 php.ini
allow_url_fopen = On
------解决方案--------------------
dns错误
要么是你没配dns要么是你本地环境没配hosts
------解决方案--------------------
楼主是否网络可以连接到远程?

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!