아래 에러관련문의 다시드립니다. 정보
아래 에러관련문의 다시드립니다.본문
에러나는 주소예요.
입니다.
Warning: imagejpeg(): Unable to open './g4/skin/latest/cunic_group/img/no_image.gifThumb' for writing in /home/mejang/html/g4/skin/latest/cunic_group/latest.skin.php on line 76
자꾸 이렇게 나오네요 ㅠㅠ
댓글 전체
그리고 이건 스킨 latest.skin.php 입니다.
ㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡ
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
$latest_img = "$g4[path]/img/latest/";
?>
<style>
.rtop, .rbottom{display:block; background: #ffffff;}
.rtop *, .rbottom *{display: block; height: 1px; overflow: hidden; background: #F0F0F0;}
.rtop2, .rbottom2{display:block; background: #f0f0f0;}
.rtop2 *, .rbottom2 *{display: block; height: 1px; overflow: hidden; background: #f9f9f9;}
.rtop3, .rbottom3{display:block; background: #ffffff;}
.rtop3 *, .rbottom3 *{display: block; height: 1px; overflow: hidden; background: #0099FF;}
.rtop5, .rbottom5{display:block; background: #ffffff;}
.rtop5 *, .rbottom5 *{display: block; height: 1px; overflow: hidden; background: #0099FF;}
.rtop6, .rbottom6{display:block; background: #ffffff;}
.rtop6 *, .rbottom6 *{display: block; height: 1px; overflow: hidden; background: #0099FF;}
.r1{margin: 0 5px}
.r2{margin: 0 3px}
.r3{margin: 0 2px}
.r4{margin: 0 1px; height: 2px}
.r5{margin: 0 5px}
.r6{margin: 0 3px}
.r7{margin: 0 2px}
.r8{margin: 0 1px; height: 2px}
</style>
<!-- <?=$board[bo_subject]?> (<?=$board[bo_table]?>) 최신글 -->
<div style="width:406px;background: #F0F0F0" align=center><b class=rtop><b class=r1></b><b class=r2></b><b class=r3></b><b class=r4></b></b>
<table width="400" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="29" height=""></td>
<td width="19"></td>
</tr>
</table>
<table width="406" cellpadding=0 cellspacing=0><tr><td width=50% height=5 valign=top></td></tr></table>
<table width="406" border="0" cellspacing="0" cellpadding="0">
<tr>
<?
for ($k=0; $k<count($list); $k++)
{
if ($k > 0)
$title = cut_str(get_text($list[$k][wr_subject]),20);
$content = cut_str(get_text($list[$k][wr_content]), 80);
$img = "$g4[path]/data/file/{$list[$k][bo_table]}/".urlencode($list[$k][file][0][file]);
if (!file_exists($img) || !$list[$k][file][0][file])
$img = "$latest_skin_path/img/no_image.gif";
$href = "$g4[bbs_path]/board.php?bo_table=$bo_table";
$thumbx=100;
$thumby=75;
$thumbyy = $thumby+6;
$destfile =$img.'Thumb';
$size = @getimagesize($img);
if(is_array($size) && !is_file($destfile)) {
switch($size[2]) {
case(1) :
if(function_exists('ImageCreateFromGif')) $im = ImageCreateFromGif($img);
break;
case(2) :
if(function_exists('ImageCreateFromJpeg')) $im = ImageCreateFromJpeg($img);
break;
case(3) :
if(function_exists('ImageCreateFromPng')) $im = ImageCreateFromPng($img);
break;
}
$fixsize = mando_image_size($size[0], $size[1], $thumbx, $thumby);
if($im) {
if($k==0) @exec("rm ".dirname($_SERVER[SCRIPT_FILENAME])."/data/file/$bo_table/*Thumb-rf");
if(function_exists('ImageCreateTrueColor')) $newim = ImageCreateTrueColor($fixsize[x],$fixsize[y]);
else $newim = ImageCreate($fixsize[x],$fixsize[y]);
if(function_exists('ImageCopyResampled')) ImageCopyResampled($newim,$im,0,0,0,0,$fixsize[x],$fixsize[y],$size[0],$size[1]);
else ImageCopyResized($newim,$im,0,0,0,0,$fixsize[x],$fixsize[y],$size[0],$size[1]);
ImageDestroy($im);
ImageJpeg($newim, $destfile, 100);
ImageDestroy($newim);
unset($im, $newim);
}
$list[$k][img][x] = $fixsize[x];
$list[$k][img][y] = $fixsize[y];
} else {
if(is_file($destfile)) {
$size = @getimagesize($destfile);
$list[$k][img][x] = $size[0];
$list[$k][img][y] = $size[1];
} else {
$img = "";
$size = @getimagesize($img);
$list[$k][img][x] = $thumbx;
$list[$k][img][y] = $thumby;
}
}
if(is_file($destfile))$img = $destfile;
if($k==0){
echo <<<HEREDOC
<td align="center" width="86">
<table width=100 cellpadding="0" cellspacing="0" border="0" style="padding:0px;">
<tr align=center>
<td width=100 align="center" style='padding-top:0px;'>
<div align=center><table width=100 align="center" bgcolor='#ffffff' cellpadding="3" cellspacing="0" border="0">
<tr><td align="center" valign="middle" style='border:1px solid #cfcfcf'><a href="{$list[$k][href]}"><img src=" {$destfile}" width="{$list[$k][img][x]}" height="{$list[$k][img][y]}" border="0" alt="$content"></a></td>
</tr>
</table></div>
</td>
</tr>
<tr>
<td height=17 align="center" valign="middle" style='padding-top:5px;padding-bottom:5px;border:0px solid #777777'><a href="{$list[$k][href]}" style='font-family:돋움;font-size:11px;color:#336666'>{$list[$k][wr_subject]}</a></td>
</tr>
</table>
</td>
<td align="center" >
<table width="100%" height=90 cellpadding="0" cellspacing="0" border="0" style="padding:0px;" >
HEREDOC;
}else{
echo <<<HEREDOC
<tr>
<td height=17 align="left" valign="middle" style='padding-top:2px;padding-bottom:2px;border:0px solid #777777'><img src="$latest_skin_path/img/board_icon.gif" width="9" height="13"> <a href="{$list[$k][href]}" style='font-family:돋움;font-size:12px;color:#336666'>[{$list[$k][bo_subject]}]$title</a></td>
</tr>
HEREDOC;
if($i<(count($list)-1)){echo "<tr><td colspan='9' height='1' background='$latest_skin_path/img/dot_bg.gif'></td></tr>";}
}
}
?>
</table>
</td>
</tr>
</table>
<b class=rbottom><b class=r4></b><b class=r3></b><b class=r2></b><b class=r1></b></b></div>
ㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡ
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
$latest_img = "$g4[path]/img/latest/";
?>
<style>
.rtop, .rbottom{display:block; background: #ffffff;}
.rtop *, .rbottom *{display: block; height: 1px; overflow: hidden; background: #F0F0F0;}
.rtop2, .rbottom2{display:block; background: #f0f0f0;}
.rtop2 *, .rbottom2 *{display: block; height: 1px; overflow: hidden; background: #f9f9f9;}
.rtop3, .rbottom3{display:block; background: #ffffff;}
.rtop3 *, .rbottom3 *{display: block; height: 1px; overflow: hidden; background: #0099FF;}
.rtop5, .rbottom5{display:block; background: #ffffff;}
.rtop5 *, .rbottom5 *{display: block; height: 1px; overflow: hidden; background: #0099FF;}
.rtop6, .rbottom6{display:block; background: #ffffff;}
.rtop6 *, .rbottom6 *{display: block; height: 1px; overflow: hidden; background: #0099FF;}
.r1{margin: 0 5px}
.r2{margin: 0 3px}
.r3{margin: 0 2px}
.r4{margin: 0 1px; height: 2px}
.r5{margin: 0 5px}
.r6{margin: 0 3px}
.r7{margin: 0 2px}
.r8{margin: 0 1px; height: 2px}
</style>
<!-- <?=$board[bo_subject]?> (<?=$board[bo_table]?>) 최신글 -->
<div style="width:406px;background: #F0F0F0" align=center><b class=rtop><b class=r1></b><b class=r2></b><b class=r3></b><b class=r4></b></b>
<table width="400" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="29" height=""></td>
<td width="19"></td>
</tr>
</table>
<table width="406" cellpadding=0 cellspacing=0><tr><td width=50% height=5 valign=top></td></tr></table>
<table width="406" border="0" cellspacing="0" cellpadding="0">
<tr>
<?
for ($k=0; $k<count($list); $k++)
{
if ($k > 0)
$title = cut_str(get_text($list[$k][wr_subject]),20);
$content = cut_str(get_text($list[$k][wr_content]), 80);
$img = "$g4[path]/data/file/{$list[$k][bo_table]}/".urlencode($list[$k][file][0][file]);
if (!file_exists($img) || !$list[$k][file][0][file])
$img = "$latest_skin_path/img/no_image.gif";
$href = "$g4[bbs_path]/board.php?bo_table=$bo_table";
$thumbx=100;
$thumby=75;
$thumbyy = $thumby+6;
$destfile =$img.'Thumb';
$size = @getimagesize($img);
if(is_array($size) && !is_file($destfile)) {
switch($size[2]) {
case(1) :
if(function_exists('ImageCreateFromGif')) $im = ImageCreateFromGif($img);
break;
case(2) :
if(function_exists('ImageCreateFromJpeg')) $im = ImageCreateFromJpeg($img);
break;
case(3) :
if(function_exists('ImageCreateFromPng')) $im = ImageCreateFromPng($img);
break;
}
$fixsize = mando_image_size($size[0], $size[1], $thumbx, $thumby);
if($im) {
if($k==0) @exec("rm ".dirname($_SERVER[SCRIPT_FILENAME])."/data/file/$bo_table/*Thumb-rf");
if(function_exists('ImageCreateTrueColor')) $newim = ImageCreateTrueColor($fixsize[x],$fixsize[y]);
else $newim = ImageCreate($fixsize[x],$fixsize[y]);
if(function_exists('ImageCopyResampled')) ImageCopyResampled($newim,$im,0,0,0,0,$fixsize[x],$fixsize[y],$size[0],$size[1]);
else ImageCopyResized($newim,$im,0,0,0,0,$fixsize[x],$fixsize[y],$size[0],$size[1]);
ImageDestroy($im);
ImageJpeg($newim, $destfile, 100);
ImageDestroy($newim);
unset($im, $newim);
}
$list[$k][img][x] = $fixsize[x];
$list[$k][img][y] = $fixsize[y];
} else {
if(is_file($destfile)) {
$size = @getimagesize($destfile);
$list[$k][img][x] = $size[0];
$list[$k][img][y] = $size[1];
} else {
$img = "";
$size = @getimagesize($img);
$list[$k][img][x] = $thumbx;
$list[$k][img][y] = $thumby;
}
}
if(is_file($destfile))$img = $destfile;
if($k==0){
echo <<<HEREDOC
<td align="center" width="86">
<table width=100 cellpadding="0" cellspacing="0" border="0" style="padding:0px;">
<tr align=center>
<td width=100 align="center" style='padding-top:0px;'>
<div align=center><table width=100 align="center" bgcolor='#ffffff' cellpadding="3" cellspacing="0" border="0">
<tr><td align="center" valign="middle" style='border:1px solid #cfcfcf'><a href="{$list[$k][href]}"><img src=" {$destfile}" width="{$list[$k][img][x]}" height="{$list[$k][img][y]}" border="0" alt="$content"></a></td>
</tr>
</table></div>
</td>
</tr>
<tr>
<td height=17 align="center" valign="middle" style='padding-top:5px;padding-bottom:5px;border:0px solid #777777'><a href="{$list[$k][href]}" style='font-family:돋움;font-size:11px;color:#336666'>{$list[$k][wr_subject]}</a></td>
</tr>
</table>
</td>
<td align="center" >
<table width="100%" height=90 cellpadding="0" cellspacing="0" border="0" style="padding:0px;" >
HEREDOC;
}else{
echo <<<HEREDOC
<tr>
<td height=17 align="left" valign="middle" style='padding-top:2px;padding-bottom:2px;border:0px solid #777777'><img src="$latest_skin_path/img/board_icon.gif" width="9" height="13"> <a href="{$list[$k][href]}" style='font-family:돋움;font-size:12px;color:#336666'>[{$list[$k][bo_subject]}]$title</a></td>
</tr>
HEREDOC;
if($i<(count($list)-1)){echo "<tr><td colspan='9' height='1' background='$latest_skin_path/img/dot_bg.gif'></td></tr>";}
}
}
?>
</table>
</td>
</tr>
</table>
<b class=rbottom><b class=r4></b><b class=r3></b><b class=r2></b><b class=r1></b></b></div>
http://gnusr.com/ 오른쪽 중앙에 있는 만도님 솔로라는 최신글이 맞는지 확인해보시구요,
스타일시트만 아래 파일로 옮겨주시고 테스트 해보세요.
ps) 다음부터 소스를 게시판에 붙여넣으실때는 탭을 공백으로 치환해서 붙여주셔야 보기에 좋습니다.
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<style>
/* gnusr/css/life.style.css */
</style>
<? for ($i=0; $i<count($list); $i++) {
$gr_subject = cut_str($list[$i][gr_subject], 18);
}?>
<!-- <?= $list[$i][gr_subject]?> (<?=$board[bo_table]?>) 최신글 시작 -->
<div style="width:100%;background: #F0F0F0" align=center><b class=rtop><b class=r1></b><b class=r2></b><b class=r3></b><b class=r4></b></b>
<table width="95%" cellpadding="0" cellspacing="0" border="0"><tr><td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="29" height=""></td>
<td ><a href='<?=$g4[bbs_path]?>/group.php?gr_id=<?=$gr_id?>'><font style='font-family:돋움; font-size:9pt; '><strong><?=$gr_subject?> - New5</strong></font></a> </td>
<td width="60" align="right"><a href='<?=$g4[bbs_path]?>/group.php?gr_id=<?=$gr_id?>'><img src="<?=$latest_skin_path?>/img/board_more.gif" width="45" height="18" border="0"></a></td>
<td width="19"></td>
</tr>
</table>
<table width="100%" cellpadding=0 cellspacing=0><tr><td width=50% height=5 valign=top></td></tr></table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" style='padding-top:3px' bgcolor='#f9f9f9'>
<? for ($i=0; $i<count($list); $i++) {
//$gr_subject = cut_str($list[$i][gr_subject], 10);
$bo_subject = cut_str($list[$i][bo_subject], 6, "··");
$wr_subject = cut_str($list[$i][wr_subject], $subject_len,"··");
?>
<tr>
<td width="25" height="19" align="center" valign="middle" ><img src="<?=$latest_skin_path?>/img/board_icon.gif" width="9" height="13"></td>
<td valign=middle>
<?
echo $list[$i][icon_reply] . " ";
echo "<a href='{$list[$i][href]}'>";//$g4[bbs_path]/ 추가해줌
if ($list[$i][is_notice])
echo "<font style='fontcolor:#2C88B9;'>$wr_subject [$bo_subject]</font>";
else
echo "$wr_subject [$bo_subject]";
echo "</a>";
if ($list[$i][comment_cnt])
echo " <a href=\"{$list[$i][comment_href]}\"><span style='font-size:8pt; color:#9A9A9A;'>{$list[$i][comment_cnt]}</span></a>";
// if ($list[$i]['link']['count']) { echo "[{$list[$i]['link']['count']}]"; }
// if ($list[$i]['file']['count']) { echo "<{$list[$i]['file']['count']}>"; }
echo " " . $list[$i][icon_new];
// echo " " . $list[$i][icon_file];
// echo " " . $list[$i][icon_link];
// echo " " . $list[$i][icon_hot];
// echo " " . $list[$i][icon_secret];
?>
</td>
</tr>
<? if($i<(count($list)-1)){?><tr><td colspan="9" height="1" background="<?=$latest_skin_path?>/img/dot_bg.gif"></td></tr><?}?>
<? } ?>
<? if (count($list) == 0) { ?>
<tr><td colspan=2 align=center height=30 background="<?=$latest_skin_path?>/img/board_bg_line.gif">게시물이 없습니다.</td></tr>
<? } ?>
<tr><td colspan=2 height=3 valign=top></td></tr>
</table>
</td></tr></table>
<b class=rbottom><b class=r4></b><b class=r3></b><b class=r2></b><b class=r1></b></b></div>
<!-- <?= $list[$i][gr_subject]?> (<?=$board[bo_table]?>) 최신글 끝 -->
스타일시트만 아래 파일로 옮겨주시고 테스트 해보세요.
ps) 다음부터 소스를 게시판에 붙여넣으실때는 탭을 공백으로 치환해서 붙여주셔야 보기에 좋습니다.
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<style>
/* gnusr/css/life.style.css */
</style>
<? for ($i=0; $i<count($list); $i++) {
$gr_subject = cut_str($list[$i][gr_subject], 18);
}?>
<!-- <?= $list[$i][gr_subject]?> (<?=$board[bo_table]?>) 최신글 시작 -->
<div style="width:100%;background: #F0F0F0" align=center><b class=rtop><b class=r1></b><b class=r2></b><b class=r3></b><b class=r4></b></b>
<table width="95%" cellpadding="0" cellspacing="0" border="0"><tr><td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="29" height=""></td>
<td ><a href='<?=$g4[bbs_path]?>/group.php?gr_id=<?=$gr_id?>'><font style='font-family:돋움; font-size:9pt; '><strong><?=$gr_subject?> - New5</strong></font></a> </td>
<td width="60" align="right"><a href='<?=$g4[bbs_path]?>/group.php?gr_id=<?=$gr_id?>'><img src="<?=$latest_skin_path?>/img/board_more.gif" width="45" height="18" border="0"></a></td>
<td width="19"></td>
</tr>
</table>
<table width="100%" cellpadding=0 cellspacing=0><tr><td width=50% height=5 valign=top></td></tr></table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" style='padding-top:3px' bgcolor='#f9f9f9'>
<? for ($i=0; $i<count($list); $i++) {
//$gr_subject = cut_str($list[$i][gr_subject], 10);
$bo_subject = cut_str($list[$i][bo_subject], 6, "··");
$wr_subject = cut_str($list[$i][wr_subject], $subject_len,"··");
?>
<tr>
<td width="25" height="19" align="center" valign="middle" ><img src="<?=$latest_skin_path?>/img/board_icon.gif" width="9" height="13"></td>
<td valign=middle>
<?
echo $list[$i][icon_reply] . " ";
echo "<a href='{$list[$i][href]}'>";//$g4[bbs_path]/ 추가해줌
if ($list[$i][is_notice])
echo "<font style='fontcolor:#2C88B9;'>$wr_subject [$bo_subject]</font>";
else
echo "$wr_subject [$bo_subject]";
echo "</a>";
if ($list[$i][comment_cnt])
echo " <a href=\"{$list[$i][comment_href]}\"><span style='font-size:8pt; color:#9A9A9A;'>{$list[$i][comment_cnt]}</span></a>";
// if ($list[$i]['link']['count']) { echo "[{$list[$i]['link']['count']}]"; }
// if ($list[$i]['file']['count']) { echo "<{$list[$i]['file']['count']}>"; }
echo " " . $list[$i][icon_new];
// echo " " . $list[$i][icon_file];
// echo " " . $list[$i][icon_link];
// echo " " . $list[$i][icon_hot];
// echo " " . $list[$i][icon_secret];
?>
</td>
</tr>
<? if($i<(count($list)-1)){?><tr><td colspan="9" height="1" background="<?=$latest_skin_path?>/img/dot_bg.gif"></td></tr><?}?>
<? } ?>
<? if (count($list) == 0) { ?>
<tr><td colspan=2 align=center height=30 background="<?=$latest_skin_path?>/img/board_bg_line.gif">게시물이 없습니다.</td></tr>
<? } ?>
<tr><td colspan=2 height=3 valign=top></td></tr>
</table>
</td></tr></table>
<b class=rbottom><b class=r4></b><b class=r3></b><b class=r2></b><b class=r1></b></b></div>
<!-- <?= $list[$i][gr_subject]?> (<?=$board[bo_table]?>) 최신글 끝 -->
뒤 늦게 답변드립니다.
감사합니다. 에러나는부분은 이미지가 없었던점으로 나타나더군요.
이미지가 없는 글이 달릴때 NO IMAGE 가 떠야 하는데..
지금은 그냥 이미지 올려놓은 글을 해놓았는데.. 나중에는 어떻해야 할지 ㅠㅠ
에러부분의 함수를 보아도 참 애매하네요.
다른분 보니까 글을 변경하라고 해서 함수도 변경해 보았는데.
똑같은 에러가 나네요..
그리고 늦은 답변 정말 죄송합니다 ㅣ 다음부터는 주의할께요.
감사합니다. 에러나는부분은 이미지가 없었던점으로 나타나더군요.
이미지가 없는 글이 달릴때 NO IMAGE 가 떠야 하는데..
지금은 그냥 이미지 올려놓은 글을 해놓았는데.. 나중에는 어떻해야 할지 ㅠㅠ
에러부분의 함수를 보아도 참 애매하네요.
다른분 보니까 글을 변경하라고 해서 함수도 변경해 보았는데.
똑같은 에러가 나네요..
그리고 늦은 답변 정말 죄송합니다 ㅣ 다음부터는 주의할께요.