엑셀다운, 숫자를 문자로 인식
<?
$dir = "../..";
include "$dir/inc/connect.php";
include "$dir/inc/config.php";
$coin_idx = $_REQUEST['index_no'];
$ar_c = sel_query("${basictb}_coin_shop","list_name"," where index_no='$coin_idx'");
header( "Content-type: application/vnd.ms-excel" );
header( "Content-Disposition: attachment; filename=".$ar_c[list_name]."_".date('Y-m-d').".xls" );
header( "Content-Description: PHP4 Generated Data" );
print("<meta http-equiv=\"Content-Type\" content=\"application/vnd.ms-excel;charset=euc-kr\">");
?>
<html>
<body>
<table>
<Tr>
<td>핸드폰번호</td>
<td>이름</td>
</tr>
<?
$q = "select * from ${basictb}_coin_order where shop_idx = '$coin_idx' and send_date='' order by index_no desc";
$r = mysql_query($q);
$date=date('Y-m-d');
while($row = mysql_fetch_array($r))
{
mysql_query("update ${basictb}_coin_order set send_date = '$date' where index_no = $row[index_no]");
$ar_m = sel_query("${basictb}_member","name,cp"," where index_no='$row[mem_idx]'");
?>
<tr>
<td style='mso-number-format:\@;'><?=str_replace("-","",$ar_m['cp'])?></td>
<td><?=$ar_m['name']?></td>
</tr>
<?
}
?>
</table>
</body>
</html>
번호 | 제목 | 글쓴이 | 조회 | 날짜 |
---|---|---|---|---|
6 | [PHP] 파일 업로드 구현. 쓰기, 수정 | 관리자 | 4962 | 2013.01.21 15:09 |
>> | [PHP] 엑셀다운, 숫자를 문자로 인식 | 관리자 | 9978 | 2013.01.21 15:09 |
4 | [PHP] 네이버 지도 api | 관리자 | 5803 | 2013.01.21 14:22 |
3 | [PHP] 특정 날짜 계산 | 관리자 | 4969 | 2013.01.21 14:21 |
2 | [PHP] 한글 잘림 없이 substr처리 | 관리자 | 5733 | 2013.01.21 14:20 |
1 | [PHP] checkbox 배열 값 넘기기 | 관리자 | 13516 | 2013.01.21 14:18 |