다운로드하려고합니다. 이메일이 전송되지만 파일을 다운로드 할 수없는 일이 뭐죠 버튼을 파일을 제출 PDF는 다음PHP : 강제로 PDF 파일 다운로드
if(mail('[email protected]', 'Brochure Downloaded ', $string)){
$text= 'Your message recieved, We will contact you shrtly ';
$file_url = 'http://www.website.com/brochure.pdf';
header('Content-Type: application/octet-stream');
header("Content-Transfer-Encoding: Binary");
header("Content-disposition: attachment; filename=\"" . basename($file_url) . "\"");
readfile($file_url); // do the double-download-dance (dirty but worky)
}
이제 내 코드 대신 페이지를 다시로드 얻고 긴 문자가 화면에 인쇄되어
이 아닌이 컨텐츠 길이가 필요하십니까 다른 헤더 파일을 다운로드하려면
당신이 콘텐츠 길이를 사용해야 사용할 수 있나요? – Eamonn
내가 가진 전부는 여기 – Sikander
브라우저의 검사기에서 헤더가 올바르게 설정되어 있는지 확인하십시오. 서버가이를 오버라이드 할 수 있습니다. – Eamonn