Re: Print text and image in the same page.
| From: | Chris Shiflett | Date: | Mon, 16 Dec 2002 01:41:04 +0000 |
| Subject: | Re: Print text and image in the same page. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-128359@lists.php.net to get a copy of this message | ||
--- "Naif M. Al-Otaibi" <naif@linux.org.sa> wrote:
> I try to print some information (text and image) that I
> retrieve from an oracle DB, but I got the image printed
> as binary junk. When I put the line that print the image
> in a html image tag, I got a red square with "X" inside.
> What can I do to solve this problem?
This is really just an HTML question. The <img> tag has an
attribute called src that should be given a URL as a value.
The URL should be an image. For example:
<img src="http://www.php.net/gifs/php_snow.gif">
On the other hand, if you want to dump the raw image to the
browser and expect it to render it properly, you must tell
it that you are sending an image. For example:
header("Content-Type: image/gif");
Chris