<?
include_once("./_common.php");
$sql = " select * from $g4[write_prefix]$bo_table";
if ($sfl){
$sql .= " where $sfl like '%$stx%' ";
}else{
$sql .= "";
}
if ($sst){
$sql .= " order by $sst $sod ";
}else{
$sql .=" order by mb_datetime asc ";
}
$result = sql_query($sql);
$cnt = @mysql_num_rows($result);
if (!$cnt)
alert("출력할 내역이 없습니다.");
$date = date("Y-m-d",time());
header( "Content-type: application/vnd.ms-excel" );
header( "Content-Disposition: attachment; filename=$date.xls" );
header( "Cache-Control: cache, must-revalidate");
header( "Content-Description: PHP4 Generated Data" );
echo "<html><head>";
echo "<meta http-equiv='Content-Type' content='text/html; charset=ks_c_5601-1987'>";
echo "</head><body>";
echo "<table border=1 style='font-family:돋움; font-size:10pt;'><tr>";
echo "<td align=center>주민번호</td>
---중간생략---
echo "<tr>\n";
echo "<td align=center>" . $row[wr_1] . "</td>\n";
echo "</tr>\n";
}
echo "</table>";
echo "</body></html>";
if ($i == 0)
alert("자료가 없습니다.");
exit;
?>
위와 같이 해서 엑셀로 다운을 받으면 한글은 잘되는데 '주민번호'는 이상하게 들어오고..(엑셀 셀에서 두번클릭을 하면 정상적으로 보여집니다.)
아래와같이 3개..전화번호는 맨 앞자리가 잘려서 저장이 됩니다.
echo "<td align=center>" . $row[wr_10] . $row[wr_11] . $row[wr_12] . "</td>\n";
하다 하다 너무 답답해서 이렇게 질문 드려봅니다.
include_once("./_common.php");
$sql = " select * from $g4[write_prefix]$bo_table";
if ($sfl){
$sql .= " where $sfl like '%$stx%' ";
}else{
$sql .= "";
}
if ($sst){
$sql .= " order by $sst $sod ";
}else{
$sql .=" order by mb_datetime asc ";
}
$result = sql_query($sql);
$cnt = @mysql_num_rows($result);
if (!$cnt)
alert("출력할 내역이 없습니다.");
$date = date("Y-m-d",time());
header( "Content-type: application/vnd.ms-excel" );
header( "Content-Disposition: attachment; filename=$date.xls" );
header( "Cache-Control: cache, must-revalidate");
header( "Content-Description: PHP4 Generated Data" );
echo "<html><head>";
echo "<meta http-equiv='Content-Type' content='text/html; charset=ks_c_5601-1987'>";
echo "</head><body>";
echo "<table border=1 style='font-family:돋움; font-size:10pt;'><tr>";
echo "<td align=center>주민번호</td>
---중간생략---
echo "<tr>\n";
echo "<td align=center>" . $row[wr_1] . "</td>\n";
echo "</tr>\n";
}
echo "</table>";
echo "</body></html>";
if ($i == 0)
alert("자료가 없습니다.");
exit;
?>
위와 같이 해서 엑셀로 다운을 받으면 한글은 잘되는데 '주민번호'는 이상하게 들어오고..(엑셀 셀에서 두번클릭을 하면 정상적으로 보여집니다.)
아래와같이 3개..전화번호는 맨 앞자리가 잘려서 저장이 됩니다.
echo "<td align=center>" . $row[wr_10] . $row[wr_11] . $row[wr_12] . "</td>\n";
하다 하다 너무 답답해서 이렇게 질문 드려봅니다.
댓글 6개
게시글 목록
| 번호 | 제목 |
|---|---|
| 1456 | |
| 1447 | |
| 1443 |
디자이너
웹디자이너 구합니다
3
|
| 1434 | |
| 1429 |
개발자
개발의뢰 관련
4
|
| 1424 |
디자이너
손그림 스캔시..
4
|
| 1413 |
개발자
아름다운 코드란....
10
|
| 1406 |
디자이너
디자이너분께 문의 드려봅니다
6
|
| 1403 | |
| 1398 |
기획자
안녕하세요 첨뵙겟습니다^^
4
|
| 1389 | |
| 1386 |
기획자
간만에 출석 1등~
2
|
| 1381 |
기획자
패턴의 다각화
4
|
| 1374 | |
| 1372 |
디자이너
자야되는데~
1
|
| 1370 | |
| 1349 | |
| 1341 |
디자이너
저도 여기에 글남겨봅니다~ㅋ
7
|
| 1336 | |
| 1333 |
개발자
롤오버활성화 도움주실분..
2
|
| 1325 |
개발자
에디트 플러스 업데이트
7
|
| 1309 |
개발자
이런 미친..
15
|
| 1305 |
기획자
조용하네요....ㅋㅋㅋ
3
|
| 1293 | |
| 1292 | |
| 1290 |
개발자
스팸 차단
1
|
| 1286 |
디자이너
이러면 문제가 되는 건가요?
3
|
| 1280 |
디자이너
MS CS6?
5
|
| 1277 | |
| 1272 |
개발자
키워드 필터링
4
|
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기