최근 게시물 에러 입니다. 좀 봐주세요 정보
최근 게시물 에러 입니다. 좀 봐주세요
본문
Fatal error: Call to undefined function: createthumb() in /free/home/sky12/html/g4/skin/latest/basic/latest.skin.php on line 75
http://홈피주소/g4 를 치면 게시물이 안나오고 저위에 에러 메세지가 나옵니다.
latest.php 아래 소스좀 봐주세요
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
for ($i=0; $i<count($list); $i++) {
// 첫번째만 썸네일 생성
if ($i == '0') {
// bbs file
$sql = " select * from $g4[board_file_table] where bo_table = '$bo_table' and wr_id = '{$list[$i][wr_id]}' and bf_type in (1,2,3) ";
$img = sql_fetch($sql);
// 썸네일 생성
$thumb_width = "100"; //썸네일 가로길이
$thumb_height = "60"; //썸네일 세로길이
// 썸네일 디렉토리
$thumb_path = "{$g4['path']}/data/file/{$bo_table}/{$thumb_width}x{$thumb_height}";
// 디렉토리 퍼미션
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
// 파일
if ($img['bf_file']) {
// 썸네일
$thumb = $thumb_path.'/'.$img['bf_file'];
// 원본
$thumb_file = "{$g4['path']}/data/file/{$bo_table}/{$img['bf_file']}";
// 파일명
$img_filename = "{$img['bf_file']}";
} else {
// 에디터
// 내용뽑고
$img_content = "{$list[$i]['wr_content']}";
$img_tmp1 = stristr($img_content,'/data/geditor/'); // 지에디터 디렉토리 체크
$img_tmp2 = strpos($img_tmp1,'>'); // 닫고
$img_tmp3 = stristr(substr($img_tmp1,0,$img_tmp2+1),'geditor'); // 지에디터 부터 경로 시작
$img_tmp4 = substr($img_tmp3,0,strpos($img_tmp3,'"')); // 더블쿼트 이전까지
$img_fileurl = $g4['path']."/data/".$img_tmp4; // 원본파일 상대경로
// 디렉토리에 파일이 있다면.
if (file_exists($img_fileurl)) {
// 파일명
$img_filename = substr($img_tmp4,13);
} else {
// 파일명이 읍네 ?
$img_filename = "";
}
// 썸네일
$thumb = $thumb_path.'/'.$img_filename;
// 원본
$thumb_file = "{$img_fileurl}";
}
// 썸네일이 없다면
if (!file_exists($thumb)) {
// 확장자 체크
if (preg_match("/\.(jp[e]?g|gif|png)$/i", $thumb_file) && file_exists($thumb_file)) {
createThumb($thumb_width, $thumb_height, $thumb_file, $thumb, true);
}
}
if (file_exists($thumb) && $img_filename) {
$img = "<img src='{$thumb}' border='0' align='absmiddle'>";
} else {
$img= "";
}
}
// href
$link = $g4['bbs_path']."/board.php?bo_table=".$bo_table."&wr_id=".$list[$i]['wr_id'];
// 제목
$subject = conv_subject(strip_tags($list[$i]['wr_subject']),45,'..');
if ($i == '0') {
$link1 = $link;
$img = $img;
$subject1 = $subject;
}
else if ($i == '1') {
$link2 = $link;
$subject2 = $subject;
}
else if ($i == '2') {
$link3 = $link;
$subject3 = $subject;
}
}
?>
<style type="text/css">
#latest .Title {font-size:12px; color:#000000; font-weight:bold; text-decoration:none;}
#latest .Title2 {font-size:12px; color:#000000; text-decoration:none;}
</style>
<div id="latest">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="<?=$thumb_width?>" valign="top"><div style="width:<?=$thumb_width?>px; height:<?=$thumb_height?>px; padding:3px; border:1px solid #EEEEEE;"><a href="<?=$link1?>"><?=$img?></a></div></td>
<td width="8"></td>
<td valign="top">
<div style="height:21px; margin-top:2px;">· <a href="<?=$link1?>" class="Title"><?=$subject1?></a></div>
<div style="height:21px;">· <a href="<?=$link2?>" class="Title2"><?=$subject2?></a></div>
<div style="height:21px;">· <a href="<?=$link3?>" class="Title2"><?=$subject3?></a></div></td>
</tr>
</table>
</div>
http://홈피주소/g4 를 치면 게시물이 안나오고 저위에 에러 메세지가 나옵니다.
latest.php 아래 소스좀 봐주세요
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
for ($i=0; $i<count($list); $i++) {
// 첫번째만 썸네일 생성
if ($i == '0') {
// bbs file
$sql = " select * from $g4[board_file_table] where bo_table = '$bo_table' and wr_id = '{$list[$i][wr_id]}' and bf_type in (1,2,3) ";
$img = sql_fetch($sql);
// 썸네일 생성
$thumb_width = "100"; //썸네일 가로길이
$thumb_height = "60"; //썸네일 세로길이
// 썸네일 디렉토리
$thumb_path = "{$g4['path']}/data/file/{$bo_table}/{$thumb_width}x{$thumb_height}";
// 디렉토리 퍼미션
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
// 파일
if ($img['bf_file']) {
// 썸네일
$thumb = $thumb_path.'/'.$img['bf_file'];
// 원본
$thumb_file = "{$g4['path']}/data/file/{$bo_table}/{$img['bf_file']}";
// 파일명
$img_filename = "{$img['bf_file']}";
} else {
// 에디터
// 내용뽑고
$img_content = "{$list[$i]['wr_content']}";
$img_tmp1 = stristr($img_content,'/data/geditor/'); // 지에디터 디렉토리 체크
$img_tmp2 = strpos($img_tmp1,'>'); // 닫고
$img_tmp3 = stristr(substr($img_tmp1,0,$img_tmp2+1),'geditor'); // 지에디터 부터 경로 시작
$img_tmp4 = substr($img_tmp3,0,strpos($img_tmp3,'"')); // 더블쿼트 이전까지
$img_fileurl = $g4['path']."/data/".$img_tmp4; // 원본파일 상대경로
// 디렉토리에 파일이 있다면.
if (file_exists($img_fileurl)) {
// 파일명
$img_filename = substr($img_tmp4,13);
} else {
// 파일명이 읍네 ?
$img_filename = "";
}
// 썸네일
$thumb = $thumb_path.'/'.$img_filename;
// 원본
$thumb_file = "{$img_fileurl}";
}
// 썸네일이 없다면
if (!file_exists($thumb)) {
// 확장자 체크
if (preg_match("/\.(jp[e]?g|gif|png)$/i", $thumb_file) && file_exists($thumb_file)) {
createThumb($thumb_width, $thumb_height, $thumb_file, $thumb, true);
}
}
if (file_exists($thumb) && $img_filename) {
$img = "<img src='{$thumb}' border='0' align='absmiddle'>";
} else {
$img= "";
}
}
// href
$link = $g4['bbs_path']."/board.php?bo_table=".$bo_table."&wr_id=".$list[$i]['wr_id'];
// 제목
$subject = conv_subject(strip_tags($list[$i]['wr_subject']),45,'..');
if ($i == '0') {
$link1 = $link;
$img = $img;
$subject1 = $subject;
}
else if ($i == '1') {
$link2 = $link;
$subject2 = $subject;
}
else if ($i == '2') {
$link3 = $link;
$subject3 = $subject;
}
}
?>
<style type="text/css">
#latest .Title {font-size:12px; color:#000000; font-weight:bold; text-decoration:none;}
#latest .Title2 {font-size:12px; color:#000000; text-decoration:none;}
</style>
<div id="latest">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="<?=$thumb_width?>" valign="top"><div style="width:<?=$thumb_width?>px; height:<?=$thumb_height?>px; padding:3px; border:1px solid #EEEEEE;"><a href="<?=$link1?>"><?=$img?></a></div></td>
<td width="8"></td>
<td valign="top">
<div style="height:21px; margin-top:2px;">· <a href="<?=$link1?>" class="Title"><?=$subject1?></a></div>
<div style="height:21px;">· <a href="<?=$link2?>" class="Title2"><?=$subject2?></a></div>
<div style="height:21px;">· <a href="<?=$link3?>" class="Title2"><?=$subject3?></a></div></td>
</tr>
</table>
</div>
댓글 전체
해당 스킨 설치 방법을 다시 확인해 보시기 바랍니다.
createthumb()함수가 있는 파일이 없거나 Include하지 않은 듯합니다.
createthumb()함수가 있는 파일이 없거나 Include하지 않은 듯합니다.
감사합니다. 인쿠르드가 안되어 있었네요