PHP에서 pdf를 다운로드하려고하는데 할 수 있습니까? 누구든지 나를 도울 수 있습니까?
이 코드로 시도해 보았지만 작동하지 않습니다.PHP에서 pdf를 어떻게 다운로드 할 수 있습니까?
$file ="cv0.pdf";
$filename = "cv0descargado.pdf"; // el nombre con el que se descargara, puede ser diferente al original
header("Content-type: application/octet-stream");
header("Content-Type: application/force-download");
header("Content-Disposition: attachment; filename=\"$filename\"\n"); readfile($file);
가능한 중복 : // 유래를 .com/questions/364946/how-to-make-pdf-file-download-in-html-link) –
"작동하지 않는다"는 것은 무엇을 의미합니까? – Chris
오류를 찾으셨습니까? 또는 뭔가. – Karthi