Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- jQuery
- Injection
- disabled
- 크로스 컴파일
- AC1300
- 시놀로지
- XMLHTTP
- PHP GCM
- lsusb
- DS718+
- readonly
- javascript
- ajax
- SQL Injection
- include
- 커널
- FileSystemObject
- 무선랜카드
- submit
- synology
- Getrows
- utf-8
- replace
- ASP
- jquery 레이어
- RTL88x2BU
- euc-kr
- 따라다니는 배너
- form
- println
Archives
- Today
- Total
아는 것이 좋은 것이다.
[PHP] DB 내용 엑셀 다운로드 본문
header( "Content-type: application/vnd.ms-excel" ); header( "Content-type: application/vnd.ms-excel; charset=utf-8"); header( "Content-Disposition: attachment; filename = invoice.xls" ); header( "Content-Description: PHP4 Generated Data" ); $sql = "select * from tblName order by reg_date desc"; $result = mysql_query($sql); // 테이블 상단 만들기 $EXCEL_STR = " <table border='1'> <tr> <td>번호</td> <td>코드</td> <td>내용</td> </tr>"; while($row = mysql_fetch_array($result)) { $EXCEL_STR .= " <tr> <td>".$row['idx']."</td> <td>".$row['code']."</td> <td>".$row['contents']."</td> </tr> "; } $EXCEL_STR .= "</table>"; echo "<meta content=\"application/vnd.ms-excel; charset=UTF-8\" name=\"Content-type\"> "; echo $EXCEL_STR; ?>
'PHP' 카테고리의 다른 글
[PHP] 푸시 메시지 보내기 (GCM) (0) | 2014.07.15 |
---|---|
[PHP] 문자열 인코딩 변환 (0) | 2014.06.30 |
[PHP] 오류 메시지 출력 설정 (0) | 2014.06.24 |
[PHP] Fatal error: Allowed memory size of 8388608 bytes exhausted... (0) | 2014.06.19 |
[PHP] 다음 레코드로 이동 (0) | 2014.05.29 |
Comments