테스트 사이트 - 개발 중인 베타 버전입니다

스킨 도움 요청드립니다.

· 14년 전 · 922 · 2
오류내용인데요
Fatal error: Allowed memory size of 41943040 bytes exhausted (tried to allocate 6912 bytes) in /home/hosting_users/mumuzone/www/skin/board/ssang_niwos/list.skin.php on line 175

아래는 이미지 관련 소스구요.....
<!-- 목록 -->
<?
for ($i=0; $i<count($list); $i++)
{
$DISCNT=0;
if($list[$i][wr_4] > 1) $DISCNT=round(($list[$i][wr_4]-$list[$i][wr_9])/$list[$i][wr_4]*100,1);
$img = "<img src='$board_skin_path/img/noimage.gif' border=0 width='$img_width' height='$img_height' title='이미지 없음' align=left style='margin-right:5px; border:1 solid #CCCCCC; padding:3px;'>";
$thumb = $thumb_path.'/'.$list[$i][wr_id];
// 썸네일 이미지가 존재하지 않는다면
if (!file_exists($thumb)) {
$file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
// 업로드된 파일이 이미지라면
if (preg_match("/\.(jp[e]?g|gif|png)$/i", $file) && file_exists($file)) {
$size = getimagesize($file);
if ($size[2] == 1)
$src = imagecreatefromgif($file);
else if ($size[2] == 2)
$src = imagecreatefromjpeg($file);
else if ($size[2] == 3)
$src = imagecreatefrompng($file);
else
break;

$rate = $img_width / $size[0];
$height = (int)($size[1] * $rate);

// 계산된 썸네일 이미지의 높이가 설정된 이미지의 높이보다 작다면
if ($height < $img_height)
// 계산된 이미지 높이로 복사본 이미지 생성
$dst = imagecreatetruecolor($img_width, $height);
else
// 설정된 이미지 높이로 복사본 이미지 생성
$dst = imagecreatetruecolor($img_width, $img_height);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $img_width, $height, $size[0], $size[1]);
// imagepng($dst, $thumb_path.'/'.$list[$i][wr_id], $img_quality);
//chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
}
}
$imagee = urlencode($list[$i][file][0][file]); // 첫번째 파일은 이미지이며 thumb 가 먹지 않을 때 사용
if (file_exists($thumb))
$img = "<img src='../data/file/$bo_table/$imagee' width='100' height='100' border=0 style='border:1px solid #CCCCCC; padding:3px;'>";
else
if(preg_match("/\.(swf|wma|asf)$/i","$file") && file_exists($file))
{ $img = "<script>doc_write(flash_movie('$file', 'flash$i', '$img_width', '$img_height', 'transparent'));</script>"; }



?>
<tr align=center>




175번줄------------------ $src = imagecreatefromjpeg($file);

오류 수정 방법 좀 알려주세요...

댓글 작성

댓글을 작성하시려면 로그인이 필요합니다.

로그인하기

댓글 2개

해당 list.skin.php 최상단
<? 가 시작되는 바로 아래에
아래의 코드를 입력하고 새로고침해 보세요.
ini_set('memory_limit', -1);
14년 전
잘 수정 되었습니다. 감사드립니다.
어떤 의미인지 설명도 가능할까요??

게시글 목록

번호 제목
284348
284336
284333
284332
284320
284318
284316
284313
284307
284306
284303
284298
284296
284290
284286
284280
284277
284272
284261
284259