Re: [PHP-DB] Storing Images #2

[email protected] (elk dolk)
Newsgroups php.db
Message-ID <[email protected]>
> ----------------------------------------------------------
> > 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?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.