Re: Oracle retrieving jpg from blob into memory

From: Date: Thu, 03 Aug 2000 16:44:00 +0000
Subject: Re: Oracle retrieving jpg from blob into memory
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-1762@lists.php.net to get a copy of this message
In response to my own post, I should have said, <? Header("Content-type: image/jpeg"); ?> Instead of, <? echo "Content-type: image/jpeg\n\n"; ?> Long day. Mike. At 17:22 03/08/00 +0100, Mike Hanney wrote:
Hi, Do you see the jpeg in your page as binary garbage, or just nothing? Is your php script part of an include, or is it the location of an img src tag? e.g. <IMG SRC= 'the_script_that_fetches_the_jpeg.php'> Either way, the script will need to send the correct header before anything else: <? echo "Content-type: image/jpeg\n\n"; ?> Mike. At 08:55 03/08/00 -0700, Paul Fernandez wrote:
Hello, I have this piece of code that pulls in and displays a blob in text format: $stmt = ociparse($connection,"select * from table"); ociexecute ($stmt,OCI_DEFAULT); while (ocifetchinto($stmt,&$arr,OCI_RETURN_LOBS)) { var_dump($arr); } What I've been trying to do is pull out a jpg that exists as a blob in a table, and properly display it in a web page. I've seen and used scripts that would take a blob, write it to a file (picture.jpg) and then refer to it in the html script. But I've seen perl scripts pull in a blob to memory and output it to the web page WITHOUT writing to the file system. Thanks in advance -- Paul Fernandez Webmaster Structural GenomiX, Inc. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net For additional commands, e-mail: php-db-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net For additional commands, e-mail: php-db-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net


« previous php.db (#1762) next »