테스트 사이트 - 개발 중인 베타 버전입니다

파일을 엑셀 혹은 워드로 다운 받기

· 19년 전 · 4643
<?
if($DownForWord=="yes"){
header( "Content-type: application/vnd.ms-word" );
header( "Content-Disposition: attachment; filename=${LIST[Company]}.Doc" );
header( "Content-Description: PHP4 Generated Data" );
}
?>
<?
if($DownForExel=="yes"){
header( "Content-type: application/vnd.ms-excel" );
header( "Content-Disposition: attachment; filename=${LIST[Company]}.xls" );
header( "Content-Description: PHP4 Generated Data" );
}
?>



<SCRIPT>
function DownForWord(UID,CURRENT_PAGE){
file_url = "<?=$PHP_SELF?>?UID="+UID+"&CURRENT_PAGE="+CURRENT_PAGE+"&DownForWord=yes";
location.href=file_url;
}
function DownForExel(UID,CURRENT_PAGE){
file_url ="<?=$PHP_SELF?>?UID="+UID+"&CURRENT_PAGE="+CURRENT_PAGE+"&DownForExel=yes";
location.href=file_url;
}
</SCRIPT>



<input type="button" name="Button" value="다운(엑셀)" onClick="javascript:DownForExel('<?=$UID;?>','<?=$CURRENT_PAGE;?>');" style="cursor:hand";>
<input type="button" name="Button" value="다운(워드)" onClick="javascript:DownForWord('<?=$UID;?>','<?=$CURRENT_PAGE;?>');" style="cursor:hand";><div class='small'>[이 게시물은 관리자님에 의해 2011-10-31 17:12:10 PHP & HTML에서 이동 됨]</div>

댓글 작성

댓글을 작성하시려면 로그인이 필요합니다.

로그인하기

게시글 목록

번호 제목
2570
2567
2566
2565
2563
2561
2559
2558
2557
2556
2555
2554
2548
2547
2546
2545
2541
2529
2525
2522
2521
2520
2517
2513
2510
2509
2496
2492
2485
2480