php로 엑셀파일 만들기 > 개발자팁

개발자팁

개발과 관련된 유용한 정보를 공유하세요.
질문은 QA에서 해주시기 바랍니다.

php로 엑셀파일 만들기 정보

PHP php로 엑셀파일 만들기

본문

<?
$today = date("Y-m-d");
header( "Content-type: application/vnd.ms-excel" );
header( "Content-Disposition: attachment; filename=". $today. ".xls");
header( "Content-Description: PHP4 Generated Data" );
?>
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr">
<html>
<head>
<title></title>
</head>
<body>
<table border=1>
 <tr>
  <td>번호</td>
  <td>번호+1</td>
 </tr>
<? for($i=0; $i<10; $i++){ ?>
 <tr>
  <td><?= $i ?></td>
  <td><?=$i+1 ?></td>
 </tr>
<? } ?>
 <tr>
 </tr>
</table>
</body>
</html>
[이 게시물은 관리자님에 의해 2011-10-31 17:12:10 PHP & HTML에서 이동 됨]
추천
0
  • 복사

댓글 1개

© SIRSOFT
현재 페이지 제일 처음으로