Posted by Pablito on 08/17/06 08:18
Hi at all
I want that a visitor of my internet site download a pdf file (12 mega
length) without display it
To make that I tryed many scripts but they do not work
The most simply script that I used is:
<?php
header("Content-type: application/pdf");
header("Content-Disposition: attachment; filename=newspaper.pdf");
?>
It work!!!
Infact it save the file but not the full file that is 12 M. but only few
Kb.an after isd I open the file it make error.
Then I tryed:
<?php
header("Content-type: application/pdf");
header("Content-Disposition: attachment; filename=newspaper.pdf");
header("Content-Length: ".filesizenewspaper.pdf);
?>
Then I tryed:
<?
$File="newspepar.pdf";
header("Pragma: public");
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: must-revalidate");
header("Content-type: application/pdf");
header("Content-Length: ".filesize($file));
header("Content-disposition: inline; filename=$file");
header("Accept-Ranges: ".filesize($file));
readfile($file);
exit();
?>
but they make Nothing
Please how can I solve the problem?
Thank in advance
Pablito
Navigation:
[Reply to this message]
|