이미지파일 개별적으로 불러오고 싶은데 어떻게 해야하나요? (고수님들의 도움요청) 정보
이미지파일 개별적으로 불러오고 싶은데 어떻게 해야하나요? (고수님들의 도움요청)본문
write.php 파일
<? if ($is_file) { ?>
<tr>
<td height="25"><span class="style3">자료첨부 </span></td>
<td width="644"><input type="file" name="bf_file[0]" class="input" size="50" title='파일 용량 <?=$upload_max_filesize?> 이하만 업로드 가능'> <? if ($file[0][source]) { ?> <input type='checkbox' name='bf_file_del[0]' value='1' class="box"><a href='<?=$file[0][href]?>'><?=$file[0][source]?></a> <span class="style3">삭제</span> <?} else {?><?}?></td>
</tr>
<tr><td colspan=2 height=1 bgcolor=#e7e7e7></td></tr>
<tr>
<td height="25"><span class="style3">자료첨부 </span></td>
<td width="644"><input type="file" name="bf_file[1]" class="input" size="50" title='파일 용량 <?=$upload_max_filesize?> 이하만 업로드 가능'> <? if ($file[1][source]) { ?> <input type='checkbox' name='bf_file_del[1]' value='1' class="box"><a href='<?=$file[1][href]?>'><?=$file[1][source]?></a> <span class="style3">삭제</span> <?} else {?><?}?></td>
</tr>
<tr><td colspan=2 height=1 bgcolor=#e7e7e7></td></tr>
<tr>
<td height="25"><span class="style3">자료첨부 </span></td>
<td width="644"><input type="file" name="bf_file[2]" class="input" size="50" title='파일 용량 <?=$upload_max_filesize?> 이하만 업로드 가능'> <? if ($file[2][source]) { ?> <input type='checkbox' name='bf_file_del[2]' value='1' class="box"><a href='<?=$file[2][href]?>'><?=$file[2][source]?></a> <span class="style3">삭제</span> <?} else {?><?}?></td>
</tr>
------------------------------------------------------------------------------------------------
기존에 베이직에서 + - 해서 파일 추가하는 방식이 아니라 이미지를 하나하나 개별적으로 사용하고 싶어서 위와 같이 입력했을때 View.php 에서 이미지 파일을 하나하나 가지고 오려면 어떻게 해야할 까요?
$a="1번파일"
$b="2번파일"
이렇게 설정하고 싶은데 막공부하는 초보라 어떻게 해야할지 모르겠어요. ㅜㅜ
도움 부탁드립니다.
------------------------------------------------------------------------------------------------
<?
// 파일 출력
$sql = "select * from g4_board_file where `bo_table`='$bo_table' and `wr_id`='$wr_id'";
$result=mysql_query($sql);
for($i=0 ; $row = mysql_fetch_array($result) ; $i++){
echo "<img src =$g4[path]/data/file/$bo_table/$row[bf_file] width=100% border=0 $style>";
}
?>
<? if ($is_file) { ?>
<tr>
<td height="25"><span class="style3">자료첨부 </span></td>
<td width="644"><input type="file" name="bf_file[0]" class="input" size="50" title='파일 용량 <?=$upload_max_filesize?> 이하만 업로드 가능'> <? if ($file[0][source]) { ?> <input type='checkbox' name='bf_file_del[0]' value='1' class="box"><a href='<?=$file[0][href]?>'><?=$file[0][source]?></a> <span class="style3">삭제</span> <?} else {?><?}?></td>
</tr>
<tr><td colspan=2 height=1 bgcolor=#e7e7e7></td></tr>
<tr>
<td height="25"><span class="style3">자료첨부 </span></td>
<td width="644"><input type="file" name="bf_file[1]" class="input" size="50" title='파일 용량 <?=$upload_max_filesize?> 이하만 업로드 가능'> <? if ($file[1][source]) { ?> <input type='checkbox' name='bf_file_del[1]' value='1' class="box"><a href='<?=$file[1][href]?>'><?=$file[1][source]?></a> <span class="style3">삭제</span> <?} else {?><?}?></td>
</tr>
<tr><td colspan=2 height=1 bgcolor=#e7e7e7></td></tr>
<tr>
<td height="25"><span class="style3">자료첨부 </span></td>
<td width="644"><input type="file" name="bf_file[2]" class="input" size="50" title='파일 용량 <?=$upload_max_filesize?> 이하만 업로드 가능'> <? if ($file[2][source]) { ?> <input type='checkbox' name='bf_file_del[2]' value='1' class="box"><a href='<?=$file[2][href]?>'><?=$file[2][source]?></a> <span class="style3">삭제</span> <?} else {?><?}?></td>
</tr>
------------------------------------------------------------------------------------------------
기존에 베이직에서 + - 해서 파일 추가하는 방식이 아니라 이미지를 하나하나 개별적으로 사용하고 싶어서 위와 같이 입력했을때 View.php 에서 이미지 파일을 하나하나 가지고 오려면 어떻게 해야할 까요?
$a="1번파일"
$b="2번파일"
이렇게 설정하고 싶은데 막공부하는 초보라 어떻게 해야할지 모르겠어요. ㅜㅜ
도움 부탁드립니다.
------------------------------------------------------------------------------------------------
<?
// 파일 출력
$sql = "select * from g4_board_file where `bo_table`='$bo_table' and `wr_id`='$wr_id'";
$result=mysql_query($sql);
for($i=0 ; $row = mysql_fetch_array($result) ; $i++){
echo "<img src =$g4[path]/data/file/$bo_table/$row[bf_file] width=100% border=0 $style>";
}
?>
댓글 전체
1번 이미지 출력
<img src="<?=$view[file][0][path]?>/<?=$view[file][0][file]?>">
다른 내용들~~~~
2번 이미지 출력
<img src="<?=$view[file][1][path]?>/<?=$view[file][1][file]?>">
또 다른 내용들~~~
3번 이미지 출력
<img src="<?=$view[file][2][path]?>/<?=$view[file][2][file]?>">
<img src="<?=$view[file][0][path]?>/<?=$view[file][0][file]?>">
다른 내용들~~~~
2번 이미지 출력
<img src="<?=$view[file][1][path]?>/<?=$view[file][1][file]?>">
또 다른 내용들~~~
3번 이미지 출력
<img src="<?=$view[file][2][path]?>/<?=$view[file][2][file]?>">
균이님 감사합니다.^^ 덕분에 오늘밤은 편하게 잘것 같아요.. ㅎㅎ