PHP 4.0 Bug #9666 Updated: Can't display image/pjpeg and image/gif in one sanme page
| From: | mathieu@php.net | Date: | Sun, 11 Mar 2001 10:35:11 +0000 |
| Subject: | PHP 4.0 Bug #9666 Updated: Can't display image/pjpeg and image/gif in one sanme page | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-48644@lists.php.net to get a copy of this message | ||
ID: 9666
Updated by: mathieu
Reported By: hellmarch@263.net
Status: Open
Bug Type: *Graphics related
Assigned To:
Comments:
If you inserted this with PHP also, did you use addslashes
on the binary data? IIRC that's required, or mysql 'll be kinda messy with the data..
-- Mathieu
Previous Comments:
---------------------------------------------------------------------------
[2001-03-11 00:04:12] hellmarch@263.net
Sorry,this page is not on web,it's on my intranet.I am a Chinese,I am not good at english.I
mean one of the two types will not display on the first time that the page load,Must refresh can
display togather.
---------------------------------------------------------------------------
[2001-03-10 14:07:36] sniper@php.net
Works for me just fine. What is the url to that page of
yours?
--Jani
---------------------------------------------------------------------------
[2001-03-10 03:19:26] hellmarch@263.net
I am using php 4.03pl1 version on linux now.I found that bug:i use mysql's BLOB mode to record
a gif or jpg binary data stream,when i read them out and display them in one same page,gif or jpg
will not display on page at the first time i load the page.Must refresh the page,the two type can be
displayed.
I don't know if this is a bug or not,so,thanx a lot.
Attach,my program:
<?
require("config.inc");
$db = mysql_connect($db_server,$db_user,$db_pass) or die('Can't connect db
server');
mysql_select_db($db_name) or die('Can't connect to read database');
$sql = "select data,filetype from images where name='$name'";
$res = mysql_query($sql,$db);
$data = mysql_result($res,0,"data");
$type = mysql_result($res,0,"filetype");
Header( "Content-type: $type");
echo $data;
mysql_close();
?>
---------------------------------------------------------------------------
ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=9666&edit=2