이미지 없을때 기본 이미지 출력 ???? 정보
이미지 없을때 기본 이미지 출력 ????본문
이미지를 안올렸을때 기본 이미지가 출력 토록 할려면 어떻게 해야 하는지 좀 도와 주세요..
아래는 이곳에서 오달수님의 도움으로 찻아서 삽입시킨
리스트에 이미지 출력 되도록 삽입된 소스 입니다..
아래의 소스중 어디에 어떤 코트를 넣어야 하는지요???
다시한번 고수님들의 조언을 기다립니다 ....
<?
#####################################################
// 업로드된 이미지를 리스트에서 랜덤출력
echo"";
//$img_width=$td_width__-7;
$img_width=40;
$rand_arr=array();reset($rand_arr); $rand_img_num="";
for($fi=0, $fi_pic=0, $m=0; $m < $list[$i][file][count]; $m++){
$f_type=""; $f_style=""; $f_path=""; $f_file ="";
// echo"파일타입: {$list[$i][file][0][image_type]}<br>";
$f_type=$list[$i][file][$m][image_type];
if($f_type=='1' || $f_type=='2' || $f_type=='3' ||$f_type=='6' || $f_type=='7') $f_style="img";
else if($f_type=='4') $f_style="movie_img";//쭉..형태추가
$f_file = urlencode($list[$i][file][$m][file]);
$f_path="{$list[$i][file][$m][path]}";
$f_file = urlencode($f_file);
if(preg_match("/\.(jp[e]?g|tif|bmp|gif|png)$/i","$f_file")
&& file_exists("$f_path/$f_file")&& $f_style=="img")
{//이미지면
//여기서 배열을 만들고 아래에서 랜덤으로 한다.
$fi++;
$rand_arr[$fi]=$m;
}
}//for
#####################################################
$rand_img_num = mt_rand(1,count($rand_arr));
//요놈이다. echo"<font color='red'>{$rand_arr[$rand_img_num]}</font>";
//그럼 그림이 있을때만 & 뽑아질경우만...물론 있으니까 뽑히겠지만..
if($fi !=0 && $rand_img_num !=''){
echo"<a href='{$list[$i][href]}'>";
$f_file = urlencode($list[$i][file][$rand_arr[$rand_img_num]][file]);
$f_path="{$list[$i][file][$rand_arr[$rand_img_num]][path]}";
$f_file = urlencode($f_file);
echo"<img src='$f_path/$f_file' width='35' height='35' border='1'><br>";
}
echo "</a>";
####################################2006.07.08 dalsoo######
?>
#####################################################
// 업로드된 이미지를 리스트에서 랜덤출력
echo"";
//$img_width=$td_width__-7;
$img_width=40;
$rand_arr=array();reset($rand_arr); $rand_img_num="";
for($fi=0, $fi_pic=0, $m=0; $m < $list[$i][file][count]; $m++){
$f_type=""; $f_style=""; $f_path=""; $f_file ="";
// echo"파일타입: {$list[$i][file][0][image_type]}<br>";
$f_type=$list[$i][file][$m][image_type];
if($f_type=='1' || $f_type=='2' || $f_type=='3' ||$f_type=='6' || $f_type=='7') $f_style="img";
else if($f_type=='4') $f_style="movie_img";//쭉..형태추가
$f_file = urlencode($list[$i][file][$m][file]);
$f_path="{$list[$i][file][$m][path]}";
$f_file = urlencode($f_file);
if(preg_match("/\.(jp[e]?g|tif|bmp|gif|png)$/i","$f_file")
&& file_exists("$f_path/$f_file")&& $f_style=="img")
{//이미지면
//여기서 배열을 만들고 아래에서 랜덤으로 한다.
$fi++;
$rand_arr[$fi]=$m;
}
}//for
#####################################################
$rand_img_num = mt_rand(1,count($rand_arr));
//요놈이다. echo"<font color='red'>{$rand_arr[$rand_img_num]}</font>";
//그럼 그림이 있을때만 & 뽑아질경우만...물론 있으니까 뽑히겠지만..
if($fi !=0 && $rand_img_num !=''){
echo"<a href='{$list[$i][href]}'>";
$f_file = urlencode($list[$i][file][$rand_arr[$rand_img_num]][file]);
$f_path="{$list[$i][file][$rand_arr[$rand_img_num]][path]}";
$f_file = urlencode($f_file);
echo"<img src='$f_path/$f_file' width='35' height='35' border='1'><br>";
}
echo "</a>";
####################################2006.07.08 dalsoo######
?>
댓글 전체
많이 공부를 하셔야겠습니다.
}
echo "</a>";
||
v
}
else
{ echo "<img src=\"$board_skin_path/img/no_image.gif\" width=82 height=66 border=0><br>";
}
echo "</a>";
}
echo "</a>";
||
v
}
else
{ echo "<img src=\"$board_skin_path/img/no_image.gif\" width=82 height=66 border=0><br>";
}
echo "</a>";
제가 나이가 쫌 있다보니 좀 느립니다 ㅎㅎ 짐 45세 에여 ㅡㅡ
지송하구 감사 합니다 ㅎㅎㅎ
지송하구 감사 합니다 ㅎㅎㅎ
네 그누보드에는 다른 프로그램 커뮤니티 보다 연세드신 분들이 많습니다.
40대도 아주많고 50대 이신 분들도 좀 있으신것으로 압니다.
아마 달수님도 비슷하실 걸요?
40대도 아주많고 50대 이신 분들도 좀 있으신것으로 압니다.
아마 달수님도 비슷하실 걸요?
설마 하며 깜짝 놀라실듯...... ㅎㅎㅎ
님들의 답변 정말 감사 합니다 ^^