Hi,
ich möchte eine Datei zu Download anbieten. Bis jetzt sieht das bei mir so aus:
Der Aufruf:
und download.php:
Jetzt aber kommts... Mein Browser zeigt dann folfendes an
:
Download folgender Datei:
download.php?file=datei.txt
Öffnen / Speichern / Abbrechen...
Was muß ich ändern, damit nur "Download folgender Datei: datei.txt" angezeigt wird?
ich möchte eine Datei zu Download anbieten. Bis jetzt sieht das bei mir so aus:
Der Aufruf:
PHP-Code:
<?php
echo "<a href=\"download.php?file=datei.txt\">download</a>";
?>
PHP-Code:
<?php
$datei = $_GET[file];
header ("Content-Disposition: attachment; filename=\"$datei\"");
header ("Content-Type: application/octetstream");
readfile ("$datei");
?>

Download folgender Datei:
download.php?file=datei.txt
Öffnen / Speichern / Abbrechen...
Was muß ich ändern, damit nur "Download folgender Datei: datei.txt" angezeigt wird?
Kommentar