GetImageSize 로 외부 썸네일의 크기를 못불러 오는 이유? 정보
GetImageSize 로 외부 썸네일의 크기를 못불러 오는 이유?
본문
오류가 나는곳의 주소를 알려주시면 더 빠르고 정확하게 답변 받을 수 있습니다.
오류 주소 : GetImageSize 로 geditor 로 올린 사진들을 불러와 썸네일을 생성하려고 하면 다음과 같은 에러가 납니다 :
Warning: getimagesize() [function.getimagesize]: URL file-access is disabled in the server configuration in C:\APM_Setup\htdocs\ko\skin\board\basic\list.gallery.php on line 220
Warning: getimagesize(http://localhost/ko/data/geditor/0806/2130706433_76a4d02e_logo.gif) [function.getimagesize]: failed to open stream: no suitable wrapper could be found in C:\APM_Setup\htdocs\ko\skin\board\basic\list.gallery.php on line 220
Warning: Division by zero in C:\APM_Setup\htdocs\ko\skin\board\basic\list.gallery.php on
GetImageSize로 이를 못불러 오는 이유가 뭔가욤?
오류 주소 : GetImageSize 로 geditor 로 올린 사진들을 불러와 썸네일을 생성하려고 하면 다음과 같은 에러가 납니다 :
Warning: getimagesize() [function.getimagesize]: URL file-access is disabled in the server configuration in C:\APM_Setup\htdocs\ko\skin\board\basic\list.gallery.php on line 220
Warning: getimagesize(http://localhost/ko/data/geditor/0806/2130706433_76a4d02e_logo.gif) [function.getimagesize]: failed to open stream: no suitable wrapper could be found in C:\APM_Setup\htdocs\ko\skin\board\basic\list.gallery.php on line 220
Warning: Division by zero in C:\APM_Setup\htdocs\ko\skin\board\basic\list.gallery.php on
GetImageSize로 이를 못불러 오는 이유가 뭔가욤?
댓글 전체
URL file-access is disabled in the server configuration
http://kr2.php.net/manual/en/filesystem.configuration.php#ini.allow-url-fopen
php.ini에서 allow_url_fopen 값을 on으로 바꾸세요.
http://kr2.php.net/manual/en/filesystem.configuration.php#ini.allow-url-fopen
php.ini에서 allow_url_fopen 값을 on으로 바꾸세요.
답변 감사합니다... ㅠ_ㅠ 그런데 아직도 안되요;;;
if (file_exists($thumb) && $list[$i][file][0][file]) {
$img = "<a href='$g4[path]/data/file/$bo_table/$image' class='highslide' onclick='return hs.expand(this)' ><img src='{$thumb}' border=0 style='border:0px solid #999999; display:block;' /></a>";
} else {
preg_match("`<\s*img\s+src\s*=\s*['|\"]?([^'|\"\s]+://[^'|\"\s]+\.(gif|jpe?g|png))['|\"]?\s*[^>]+`i", $list[$i]['wr_content'], $images);
if (!empty($images[1])) {
$img_size = GetImageSize("$images[1]");
if($img_size[0] >= $img_size[1]) {
$imgper = $thumb_width/$img_size[0];
$thumb_height = $img_size[1]*$imgper;
}else{
$imgper = $thumb_height/$img_size[1];
$thumb_width = $img_size[0]*$imgper;
}
$img = "<a href='$g4[path]/data/file/$bo_table/$image') class='highslide' onclick='return hs.expand(this)' ><img src='{$images[1]}' align='absmiddle' border='0' style='display:block;' /></a>";
} else {
echo "";
}
}
이부분인데 뭐가 문제인가요?
if (file_exists($thumb) && $list[$i][file][0][file]) {
$img = "<a href='$g4[path]/data/file/$bo_table/$image' class='highslide' onclick='return hs.expand(this)' ><img src='{$thumb}' border=0 style='border:0px solid #999999; display:block;' /></a>";
} else {
preg_match("`<\s*img\s+src\s*=\s*['|\"]?([^'|\"\s]+://[^'|\"\s]+\.(gif|jpe?g|png))['|\"]?\s*[^>]+`i", $list[$i]['wr_content'], $images);
if (!empty($images[1])) {
$img_size = GetImageSize("$images[1]");
if($img_size[0] >= $img_size[1]) {
$imgper = $thumb_width/$img_size[0];
$thumb_height = $img_size[1]*$imgper;
}else{
$imgper = $thumb_height/$img_size[1];
$thumb_width = $img_size[0]*$imgper;
}
$img = "<a href='$g4[path]/data/file/$bo_table/$image') class='highslide' onclick='return hs.expand(this)' ><img src='{$images[1]}' align='absmiddle' border='0' style='display:block;' /></a>";
} else {
echo "";
}
}
이부분인데 뭐가 문제인가요?
위에 사이트를 보면
On Windows versions prior to PHP 4.3.0, the following functions do not support remote file accessing: include(), include_once(), require(), require_once() and the imagecreatefromXXX functions in the GD Functions extension.
원도우에서 PHP4.3 미만에서는 안 된다고 써 있네요.
On Windows versions prior to PHP 4.3.0, the following functions do not support remote file accessing: include(), include_once(), require(), require_once() and the imagecreatefromXXX functions in the GD Functions extension.
원도우에서 PHP4.3 미만에서는 안 된다고 써 있네요.
우왕... 정말 감사합니다~!