i'm looking for a possibility to start a download.
here is my current code:
Code: Select all
header("Content-Type: $_contenttype");
header("Content-Disposition: attachment; filename="$_filename"");
// flush();
echo $filecontent;what i want the code to do is to start a normal download.
$filecontent will be created after sending the header (this is because the file is decoded from an email - $filecontent is an email-attachment).
what i've tried out is adding flush(); after sending the header. i thought the browser would start the download dialog - however it doesn't!
is there an additional header-tag that might help me? i've read something about "content-size: filesize($file)". but i don't believe that this might help me!
greets micrix