Re: Storing Images #2
| From: | elk dolk | Date: | Fri, 05 Feb 2010 09:08:06 +0000 |
| Subject: | Re: Storing Images #2 | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-46860@lists.php.net to get a copy of this message | ||
> ----------------------------------------------------------
> > I have my photos in /public_html/img/gid directory and
> with this path:
> > <img
> > src='http://www.mydomain.com/img/{$gid}/{$photoFileName}'
> > in
> getImage.php the server displays the photos.
> >
> > Now if I put my photos outside of the public_html like
> this:
> > /hidden_images/img/gid
> >
> > what would be the correct path to the photos in the
> getImage.php script?
>
> Do you mean what url? You'll need a script to pull them
> from outside the document root. The advantage of this is you
> can do authentication checks before displaying the image.
> The disadvantage is the web-server isn't serving the images
> directly so there will be a slow down.
>
> So you point your images to
>
> getimage.php?image=123456
>
..............................................................
thank you for your useful comment, but I mean what url should I use
for img src instead of <img src='http://www.mydomain.com/img/{$gid}/{$photoFileName}'
in the getImage.php script?