답변 1개 / 댓글 4개
채택된 답변
+20 포인트
8년 전
파싱한 결과물을 csv 파일로 만들어 업로드 시키고
페이지 접근시 아래와 같은형식으로 개발하시면 될 것 같습니다
Copy
<?php
$filepath = './hello_world.csv';
$filesize = filesize($filepath);
$path_parts = pathinfo($filepath);
$filename = $path_parts['basename'];
$extension = $path_parts['extension'];
header("Pragma: public");
header("Expires: 0");
header("Content-Type: application/octet-stream");
header("Content-Disposition: attachment; filename=\"$filename\"");
header("Content-Transfer-Encoding: binary");
header("Content-Length: $filesize");
ob_clean();
flush();
readfile($filepath);
?>
답변에 대한 댓글 4개
답변을 작성하려면 로그인이 필요합니다.