나는 당신이 당신의 Content-disposition
헤더의 일부로서 파일 이름에 브라우저에 확장을 보내야 확신
header("Expires: 0");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Content-type: application/".$result['ext']);
header('Content-length: '.filesize($file));
header('Content-disposition: attachment; filename='.$result['file_name']);
readfile($file);
exit;
을 사용하고 있습니다. 코드에 대한
, 당신은이 위치를 변경해야합니다 :
header('Content-disposition: attachment; filename='.$result['file_name']);
에 :
$filename = $result['file_name'] . '.' . $result['ext'];
header('Content-disposition: attachment; filename=' . $filename);
감사합니다 내가 당신을 평가할 수있는 방법 지금 – user1467983
을하고있다. 죄송합니다. 여기에 옵션이 표시되지 않습니다. ( – user1467983
환영합니다! 질문을받은 후 15 분이 경과 할 때까지 답변을 수락 할 수있는 옵션이 없습니다. 자세한 내용은 [답변 수락 방법 작품] (http://meta.stackexchange.com/questions/5234/how-does-accepting-an-answer-work) – nickb