페이지 파일 다운로드 때문에 질문 드립니다.
본문
링크로 페이지 내용을 txt 파일로 저장 할려고 합니다.
인코딩이 UTF-8 이 아닌 ANSI 로 저장할려면 어떻게 해야 할까요?
<?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');
?>
답변을 작성하시기 전에 로그인 해주세요.