[英]getimagesize works for some images and not others
我有以下腳本,該腳本在使用PHP 5.2.6的本地服務器上返回圖像的高度和寬度,但在使用5.2.17的共享主機帳戶上不返回該圖像的高度和寬度。
ini_set('memory_limit', '32M');
list($width, $height, $type, $attr) = getimagesize("http://images.jcrew.com/erez4/erez?src=images/eiec/39/39251/39251_WO7826.tif&tmp=prdAr3");
echo "<img src=\"http://images.jcrew.com/erez4/erez?src=images/eiec/39/39251/39251_WO7826.tif&tmp=prdAr3\" $attr alt=\"getimagesize() example\" />";
我嘗試按照另一個問題的建議增加memory_limit
。 從其他站點獲取圖像大小在本地和遠程都可以,但是對於此站點,只能在本地使用。 可能會發生什么?
檢查是否禁用allow-url-fopen
。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.