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

메인에서 이미지 추출했는데 엑박 나오네요. 채택완료

다조아해 11년 전 조회 4,844

메인에서 이미지 추출했는데 엑박이 나오네요.

전에 사용했던 스킨인데..

어찌 해야 하는지 모르겠네요.

 

파일을 하나 올려야 하는거 같은데...기억이 나지 않아서요..

 

 

http://ktcpg.com/bbs/bbs/main1.php">http://ktcpg.com/bbs/bbs/main1.php

 

보여서 페이지에서 이렇게 추출했고..

 

 

최신 스킨 소스입니다.

if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가

$cols  = 1; //  이미지 가로갯수 //  이미지 세로 갯수는 메인에서 지정(총 이미지 수)
$image_h  = 1; // 이미지 상하 간격
$col_width = (int)(99 / $cols);

$img_width = 100; //썸네일 가로길이
$img_height = 70; //썸네일 세로길이
$img_quality = 100; //퀼리티 100이하로 설정 일부 php버전에서는 10이하의 수로 처리 될 수 있삼

if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 이상 버전이 설치되어 있어야 사용할 수 있는 갤러리 게시판 입니다.");

$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb_img_list'; //썸네일 이미지 생성 디렉토리

@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);

?>


$wr_content = "".cut_str(strip_tags($list[$i]['wr_content']), 80, '...')."";
 //   if ($i>0 && $i%$cols==0) { echo ""; }
    $img = "";
    $thumb = $thumb_path.'/'.$list[$i][wr_id];
 
 
 // 섬네일과 새로 올린파일 날짜를 비교하여 셈네일을 갱신하기위해서 지운다.
 if ( file_exists($thumb) && (filemtime($thumb) < filemtime($list[$i][file][0][path] .'/'. $list[$i][file][0][file])) ) {
  @unlink($thumb);
 }
 
    // 썸네일 이미지가 존재하지 않는다면
    if (!file_exists($thumb)) {
        $file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
        // 업로드된 파일이 이미지라면
  //echo $i;
        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);
   $width = (int)($size[0] * $rate);

            // 계산된 썸네일 이미지의 높이가 설정된 이미지의 높이보다 작다면
            $dst = imagecreatetruecolor($img_width, $img_height);

            if ($height < $img_height) {                // 계산된 이미지 높이로 복사본 이미지 생성
    imagecopyresampled($dst, $src, 0, 0, 0, 0, $width, $img_height, $size[0], $size[1]);
    imagepng($dst, $thumb_path.'/'.$list[$i][wr_id], $img_quality);
            } else {   // 설정된 이미지 높이로 복사본 이미지 생성
    imagecopyresampled($dst, $src, 0, 0, 0, 0, $img_width, $height, $size[0], $size[1]);
    imagepng($dst, $thumb_path.'/'.$list[$i][wr_id], $img_quality);
   
   }
   //echo $i;
            chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
        }
    }

    if (file_exists($thumb))
        $img = "";
?>
        $datetime = substr($list[$i][wr_datetime],0,10);
        $datetime2 = $list[$i][wr_datetime];
        
        if ($list[$i]['wr_datetime'] >= date("Y-m-d H:i:s", $g4['server_time'] - ($row['bo_new'] * 3600))) $comment_new = "new";

        if ($datetime == $g4[time_ymd])
            $datetime2 = substr($datetime2,11,5);
        else
            $datetime2 = substr($datetime2,5,5);
   
    $list[$i][datetime] = $datetime;
    $list[$i][datetime2] = $datetime2;
   
    $a[$i] = array(
      "wr_date"=>$datetime2,
);
?>

 $rw_subject = cut_str(stripslashes($list[$i][subject]),$subject_size,'..');
 $a_link="$rw_subject";
 $a_img="$img";
 $a_comment="{$list[$i]['comment_cnt']}";
 $rw_content = cut_str(stripslashes($list[$i][wr_content]),$content_size,' ..more');
 $rw_content = strip_tags($rw_content);
?>                                                        



 



  
   
   
          
          
        
      

    
             
                  
             
             

          

    
             
                
             
       
             
           

                                    echo "";
                 echo "{$list[$i]['subject']}";
                 echo "
";
      ?>
                

   

 

 }
?>

 

 

http://ktcpg.com/bbs/bbs/main1.php">http://ktcpg.com/bbs/bbs/main1.php

 

아시는 분 좀 알려주세요.

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

답변 1개

채택된 답변
+20 포인트
11년 전

그누보드4 같으면 불당썸  

thumb.lib.php 그누보드5 같으면  

thumbnail.lib.php

파일을 불러왔나요? 스킨자료실에서...갤러리최근글 다운받아서 비교해보심이.. 

로그인 후 평가할 수 있습니다

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

답변을 작성하려면 로그인이 필요합니다.

로그인