RE: [SMARTY] Smarty or PHP problem?
| From: | Garik M | Date: | Fri, 30 Aug 2002 20:29:33 +0000 |
| Subject: | RE: [SMARTY] Smarty or PHP problem? | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-5887@lists.php.net to get a copy of this message | ||
Yes now I'm sure it's not a Smarty problem. But your code didn't help as
well.
Another weird thing is that when I run the same script on the server where
the pictures are located it shows everything fine but when I run it from
other servers some of the pictures constanty are having the same problem.
What I noticed is that if I output the file without image/jpeg header IE for
example detects and show the pictures that always are looking good and
outputs the files with problems as plain text. I resaved the pictures using
the same settings to make sure it's not a corrupted picture problem but it
didn't help.
Any other tips?
Thanks
Garik
-----Original 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-----
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