글
[code]<?
$fileDir = "해당디렉토리";
$completeFilePath=$fileDir./.$fileName;
$length = filesize($completeFilePath);
$size = $length;
header("Content-Type: application/ms-x-download");
header("Content-Type: application/octet-stream");
header("Content-Length: $size");
header("Content-Disposition: attachment; filename=$fileName");
header("Content-Transfer-Encoding: binary");
$fh = fopen($completeFilePath, "r");
fpassthru($fh);
exit;
?>[/code]
ㅇㅋ 바로 이걸원했어!
'웹 > Php' 카테고리의 다른 글
PHP DATE() 함수 사용법 (821) | 2007.08.15 |
---|---|
MYSQL DATE_FORMAT 함수 사용법 (19) | 2007.08.15 |
테터툴즈 업로드 (21) | 2007.04.11 |
제로보드 utf-8 환경에서 깨짐없이 한글 자르기(cut_str 수정) (57) | 2007.03.16 |
제로보드 euc-kr 에서 utf-8 로 변경하기 (738) | 2007.03.09 |
RECENT COMMENT