Note Submitter: mortengrigori AT gmail.com
----
Hello, I've being facing a problem using the
"Content-Disposition" parameter, every I download
a file the whole content of the page from where I download
the file is "attached" to the end of the file.
Follows the routine I've been using:
if (isset($_GET['download']) && ($_GET['download']
>= 1)) {
if ($_GET['download'] == 1)
header('Content-type: application/doc');
else if ($_GET['download'] == 2)
header('Content-type: application/rtf');
else if ($_GET['download'] == 3)
header('Content-type: application/pdf');
header('Content-Disposition: attachment; filename="' .
$_GET['file'] . '"');
readfile($_GET['file']);
}
Does anyone know a workaround? All the research I've done
gave no answer.
Thanx in advance.
--
PHP Notes Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php
|