所以我使用 getimagesize 函数来获取图像的大小。我使用的线路如下:
list($width, $height) = getimagesize($imagen);
变量 $imagen 是正确的,就好像我回显它一样,我得到了图像 url,并且图像确实存在。有什么想法吗?编辑:allow_url_fopen 已打开,我得到的错误如下:
Warning: getimagesize(): Couldn't resolve host name in /home/u969736199/public_html/web/productos.php on line 43 Warning: getimagesize(http://snapi2.vv.si/web/images/productos/R2203054.jpg): failed to open stream: operation failed in /home/u969736199/public_html/web/productos.php on line 43 http://snapi2.vv.si/web/images/productos/R2203054.jpg
我从 var_export($imagen); 得到什么 和 var_export(is_readable($imagen)); 是: http ://snapi2.vv.si/web/images/productos/EE523152.jpg'http: //snapi2.vv.si/web/images/productos/EE523152.jpg '假