Tag die Herren und Damen!
Ich hab da mal ne Frage bzgl. eines Download-Skripts:
<? $download = $_GET['bild']; //$_GET['bild'];
$basedir = "xxx";
$filelist = array(
$_GET['bild'] => "Test.jpg" );
if (!isset($filelist[$download]))
die("Datei $download nicht vorhanden.");
$filename = sprintf("%s/%s", $basedir, $filelist[$download]);
header("Content-Type: application/octet-stream");
header("Content-type: application/force_download");
header("Cache-control: private");
$save_as_name = basename($filelist[$download]);
header("Content-Disposition: attachment; filename="$save_as_name"");
readfile($filename);
?>
So sieht's aus. So nun ist folgendes, dass ich ja den Dateinmaeper $_GET übergebe und deshalb nicht immer Test.jpg wieder manuell eingeben möchte, sondern der soll sich halt auch immer ändern. Wie geht das? Könnt ihr mir helfen.? Das wäre echt prima.