엑셀로 게시판 다운 받을시 파일링크처리 정보
엑셀로 게시판 다운 받을시 파일링크처리본문
엑셀로 게시판 데이타를 다운 받을시 첨부 파일은 링크로 처리하고 싶습니다.
어떻게 처리할 수 있는지 좀 갈켜주세요...
<?
$filename = "게시판_".date("Ymd_His").".xls";
header( "Content-type: application/vnd.ms-excell; charset=euc-kr" );
header( "Content-Disposition: attachment; filename=".$filename );
header( "Content-Description: PHP4 Generated Data" );
include "_common.php";
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=euc-kr\"> ";
if($_POST['chk_wr_id']) {
$in = implode(", ", $_POST['chk_wr_id']);
$where = "WHERE wr_id IN($in)";
}
?>
<table border="1">
<tr>
<th>제목</th>
<th>내용</th>
<th>파일링크</th>
</tr>
<?
$que = sql_query("SELECT * FROM g4_write_".$_POST['bo_table']." ".$where);
while($row = sql_fetch_array($que)) {
?>
<tr>
<td><?=$row['wr_subject']?></td>
<td><?=$row['wr_content']?></td>
<td><a href=???????????>다운</td>
</tr>
<?
}
?>
</table>
여기서.... 파일을 어떻게 처리해야 될지를 모르겟어여...
어떻게 처리할 수 있는지 좀 갈켜주세요...
<?
$filename = "게시판_".date("Ymd_His").".xls";
header( "Content-type: application/vnd.ms-excell; charset=euc-kr" );
header( "Content-Disposition: attachment; filename=".$filename );
header( "Content-Description: PHP4 Generated Data" );
include "_common.php";
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=euc-kr\"> ";
if($_POST['chk_wr_id']) {
$in = implode(", ", $_POST['chk_wr_id']);
$where = "WHERE wr_id IN($in)";
}
?>
<table border="1">
<tr>
<th>제목</th>
<th>내용</th>
<th>파일링크</th>
</tr>
<?
$que = sql_query("SELECT * FROM g4_write_".$_POST['bo_table']." ".$where);
while($row = sql_fetch_array($que)) {
?>
<tr>
<td><?=$row['wr_subject']?></td>
<td><?=$row['wr_content']?></td>
<td><a href=???????????>다운</td>
</tr>
<?
}
?>
</table>
여기서.... 파일을 어떻게 처리해야 될지를 모르겟어여...
댓글 전체

엑셀에서 다운을 받으시려면 HTTP://홈피/디렉토리/파일
그누보드에서 파일경로를 자동으로 불러와야되는데....어떻게 불러와야 되는지를 몰라서여....