|
Posted by Littlefire on 04/12/06 16:44
Hi all
I wrote a proxy script that fetches images out of a database and sends the
data to the browser, using the Content-type header. For instance, if I'm
loading a jpg image from the database, the script's output will be:
header("Content-type: image/jpeg");
header("Content-length: <filesize-goes-here>");
print $imagedata;
$imagedata then obviously contains the binary image data that was in a blob
field in the database.
All that works surprisingly swell when I call the script with something
like:
<img src='resource.php?name=thejpegfile.jpg'>
Now I have a need to use some of these database-archived images in CSS as
background images. For instance:
#menu {
background-image: url(./resource.php?name=thejpegfile.jpg);
}
However, that refuses to work, I'm left without the background image
although the rest of the page displays fine.
Any ideas why the db proxy script would work when called from HTML but not
when called from CSS?
Thanks,
:A
Navigation:
[Reply to this message]
|