RE: [SMARTY] Smarty or PHP problem?
| From: | Josh Johnson | Date: | Fri, 30 Aug 2002 19:18:52 +0000 |
| Subject: | RE: [SMARTY] Smarty or PHP problem? | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-5886@lists.php.net to get a copy of this message | ||
That's weird. I have a similar script in the last project I did, but I
used readfile() to send the picture. I haven't had problems with jpegs,
gifs or most video files.
I'm sure it's not a smarty problem.
-- Josh
-----Original Message-----
From: Garik M [mailto:garik@hyestyle.com]
Sent: Friday, August 30, 2002 3:06 PM
To: smarty-general@lists.php.net
Subject: [SMARTY] Smarty or PHP problem?
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
--
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php