Smarty or PHP problem?
| From: | Garik M | Date: | Fri, 30 Aug 2002 19:05:51 +0000 |
| Subject: | Smarty or PHP problem? | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-5885@lists.php.net to get a copy of this message | ||
Hi
I'm having a weird problem with showing jpeg files. In Smarty template I use
'<img src="image_details.php?productid=11263" ...>' tag to show the
picture.
Here's the code in image_details.php that shows the picture.
...
#getting $picfile value
...
$fp=@fopen($picfile, "rb");
header("Content-type: image/jpeg\n\n");
fpassthru($fp);
fflush();
$picfile contains the full URL to the picture file located on different
server.
What happens is that some of the pictures on the output looks good, some of
them looks corrupted and some of them can not be shown at all. All the
pictures exist and look good when I open them directly using the URL. I just
use the script to hide the original location of the pictures.
Does anyone know what may be the problem?
Thanks in advance.
Garik