When I download using your demo, the files are fine. But when I download using the example script code, I get errors trying to open them, like cannot determine type (for the .gif file) and no preview available for the .jpg file. Both files are the correct size, but I can't open them.
Is the code different for the demo?
Problems with files downloaded with download script
(5 posts) Great offers for webmaster, blogger and web developer!-
Posted 9 months ago #
-
which demo/script?
Posted 9 months ago # -
The Universal Downloader script:
http://www.finalwebsites.com/snippets.php?id=4Posted 9 months ago # -
this script is a very general script and should work on all systems.
try to safe the file on your HD and open it with a text editor, most of the time you can see the problem (some error or message at the top from the file)
Posted 9 months ago # -
It works now. I found out that I could not encase it in html tags. I had it within tags:
<html>
<body>
<?php
...the script with my changes for my image files ...
?>
</body>
</html>
I also originally had it encased in ob_ php functions to eliminate already-sent-header errors I was having, but I deleted them, figuring that they may have been masking a problem.
When I deleted the html tags and made it a purely php-only script, the files downloaded with no errors and were readable. So, your script is perfect. I think somehow that whatever output that got generated from the html tags, corrupted the files when I buffered it using the ob_ functions. Thank you!Posted 9 months ago #
Reply
You must log in to post.