Re: displaying images stored as path in mysql

From: Date: Wed, 09 Aug 2000 06:35:09 +0000
Subject: Re: displaying images stored as path in mysql
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-10852@lists.php.net to get a copy of this message
On 9 Aug, Janine Roe wrote: >> print "<Img Src=\"$path/$data\">"; >> >> should work OK IF $path is under your server root - otherwise you'll get >> the broken image icon because your web server can't get at the image. >> >> If $path is not under your server root, you will need to call another >> script with a suitable header as the image source and (other bits I >> can't recall). >> >> My suggestion for the least amount of frustration and the simplest way >> of doing what you want would be to move the images directory under your >> server root. Or at least symlink it. > > well I tried your suggestion (moving it under the server root) and still > no luck. Should this script be broken up anyway to refresh the header to > what I want? If so, I have no idea how to do this. > Any other ideas? > > -- > Janine Roe > mjroe@bellatlantic.net You shouldn't need to muck around with headers if you are just going ot put the image inline - it should be no different from doing and ordinary <IMG SRC="/blah/image.jpg">. Look in your source in the browser - that may give a clue as to your problem. Oh, and also check that the images are readable by the user that the webserver runs as. Cheers -- David Robley | WEBMASTER & Mail List Admin RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/ AusEinet | http://auseinet.flinders.edu.au/ Flinders University, ADELAIDE, SOUTH AUSTRALIA

« previous php.general (#10852) next »