미채택 완료
페이지 파일 다운로드 때문에 질문 드립니다.
링크로 페이지 내용을 txt 파일로 저장 할려고 합니다.
인코딩이 UTF-8 이 아닌 ANSI 로 저장할려면 어떻게 해야 할까요?
Copy
<?php
echo "내용";
$filename = "파일명";
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header( "Content-Disposition: attachment; filename={$filename}.txt" );
header('Expires: 0');
header('Cache-Control: must-revalidate');
header('Pragma: public');
?>
|
답변 1개 / 댓글 4개
답변에 대한 댓글 4개
답변을 작성하려면 로그인이 필요합니다.