2011-04-26 5 views
0

디렉터리 및 파일 이름을 선택할 수 있도록 사용자에게 파일을 보내는 방법. 아래의 코드는 사용자가 파일을 다운로드하게하지만 Firefox에서 디렉토리를 선택할 수 없도록합니다. 어떻게 해결할 수 있습니까?사용자에게 파일 보내기

// We'll be outputting a PDF 
header('Content-type: application/pdf'); 
// It will be called downloaded.pdf 
header('Content-Disposition: attachment; filename="downloaded.pdf"'); 
// The PDF source is in original.pdf 
readfile('original.pdf'); 

답변

0

Edit | Preferences | Applications | PDF Document | Always Ask

+0

Ignacio Vazquez-Abrams는 여전히 작동하지 않습니다. "항상 묻는다"는 이미 설정되었습니다. – roney

0

이것은 브라우저의 설정입니다. 당신은 PHP 코드를 통해이를 강제 할 수 없습니다. 설정을 변경하려면, 이동 :

Edit > Preferences > Main > DownloadsAlways ask me where to save files

0

는 당신이 봤어 확인?

header("Content-Type: application/force-download");