Downloading pdf files
Posted 23 June 2006 - 11:16 PM
Posted 24 June 2006 - 01:41 AM
[a href=\"http://www.phpfreaks.com/forums/index.php?showtopic=95433\" target=\"_blank\"]http://www.phpfreaks.com/forums/index.php?showtopic=95433[/a] - you may find that useful
Unfortunately I don't. I get the same result as I've gotten with everything I've tried - the pdf gets corrupted and can't be opened.
Posted 24 June 2006 - 01:48 AM
(2) What happens to the pdf file if you simply make a link to it?
<A href="some.pdf">Click Me!<?a>
[br][br]The truely intelligent people are not those who create the dots; rather they are they ones with the ability to connect the dots into a coherent picture
all the brothers were valiant!
Posted 24 June 2006 - 02:03 AM
An appropriate representation of the requested resource /forums/index.php could not be found on this server.
when trying to reply.
Here is the code I had:
header("Content-type: $file_type"); header("Content-Disposition: attachment; filename=$file_name"); echo $file;
This was used to display files retrieved from the database. The strange thing is that the above code stopped working 2 days ago and now all pdf files are corrupted. Anyways, I'd rather have the files downloaded from the server instead of the database.
..and probably a about another 5 things. The pdf file always end up getting corrupted. I have no idea why the first code worked, and then suddenly stopped working today. It leads me to believe that some of the php settings were changed on the server, but I'm not sure.
If I simply link to the file I get prompted with the option to download and the file opens fine after it.
I tried a few other things, but for some reason I get an error why I try to post it in this message.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users