썸네일 2개 생성 오류 채택완료

썸네일 2개 생성하는 소스를 활용해서

 

lib/thumbnail.lib.php 에는

Copy
// 게시글리스트 썸네일 생성 function get_list_thumbnail($bo_table, $wr_id, $thumb_width, $thumb_height, $is_create=false, $is_crop=true, $crop_mode='center', $is_sharpen=false, $um_value='80/0.5/3', $option=0) {     global $g5, $config;     $filename = $alt = "";     $edt = false; 
    $sql = " select bf_file, bf_content from {$g5['board_file_table']}                 where bo_table = '$bo_table' and wr_id = '$wr_id' and bf_type between '1' and '3' order by bf_no limit $option, 1 ";     $row = sql_fetch($sql);

 

 

skin/board/gallery/list.skin.php  파일에는

 

Copy
<?php                     if ($list[$i]['is_notice']) { // 공지사항  ?>                         <strong style="width:<?php echo $board['bo_gallery_width'] ?>px;height:<?php echo $board['bo_gallery_height'] ?>px">공지</strong>                     <?php } else {                         $thumb = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], $board['bo_gallery_width'], $board['bo_gallery_height']);                         $thumb2 = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], $board['bo_gallery_width'], $board['bo_gallery_height'], 'false', 'true', 'center', 'false', '80/0.5/3', 1);                         $thumb3 = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], $board['bo_gallery_width'], $board['bo_gallery_height'], 'false', 'true', 'center', 'false', '80/0.5/3', 2); 
                        if($thumb['src']) {                             $img_content = '<img src="'.$thumb['src'].'" alt="'.$thumb['alt'].'" width="'.$board['bo_gallery_width'].'" height="'.$board['bo_gallery_height'].'">';                             $img_content .= '<br><img src="'.$thumb2['src'].'" alt="'.$thumb2['alt'].'" width="'.$board['bo_gallery_width'].'" height="'.$board['bo_gallery_height'].'">';                         } else {                             $img_content = '<span style="width:'.$board['bo_gallery_width'].'px;height:'.$board['bo_gallery_height'].'px">no image</span>';                         } 
                        echo $img_content;                     }                     ?>

 

이렇게 넣었는데요

썸네일 위에 이런 문구가 나타납니다.


Warning: chmod() [function.chmod]: Operation not permitted in /www/도메인/lib/thumbnail.lib.php on line 417 

이런 오류가 납니다. 왜그런건가요 ㅠ.ㅠ 

답변 1개

chmod 권한변경이 안될때는 해당파일의 소유자를 살펴보세요.

파일의 소유권자와 php 스크립트를 실행중인 유저인 apache 서버(웹서버가 아파치일경우) 실행유저인 apache, nobody 등이 아닌 경우에는 권한변경이 안됩니다. 

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

답변에 대한 댓글 1개

무슨 말씀인지 잘..ㅠ.ㅠ
http://sir.kr/g5_tip/2410
여기 게시물 올라온 대로 한지라..

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

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

로그인
🐛 버그신고