-3
내 웹 사이트 (html/php)에이 파일을 탐색기에 표시하지 않고 HTML 파일을 다운로드 할 링크를 만들고 싶습니다. 가능한가?HTML 파일 다운로드
$fullPath = 'the/Path/To/The/File.html';
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Length: ' . filesize($fullPath));
header('Content-Disposition: attachment; filename="' . basename($fullPath) . '"');
readfile($fullPath);
exit();
네, 가능하다고 : – str