Re: Linking to images above the webspace
| From: | Nitsan Bin-Nun | Date: | Fri, 17 Jul 2009 12:23:30 +0000 |
| Subject: | Re: Linking to images above the webspace | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-295515@lists.php.net to get a copy of this message | ||
You can create a PHP script which will serve files based on their location
which will be transfered through a GET parameter.
Just send the correct response headers which will be corresponded to the
file's mime type, size, etc.
Then use something like:
<img src='a.php?image_full_path=/home/root/etc/fdsa.jpg' />
Good luck!
On Fri, Jul 17, 2009 at 2:19 PM, Al <news@ridersite.org> wrote:
> I've got a php script in which I'd like to link to an image above the
> webspace [doc-root] and render it as <img ....> or <object...>
>
> Anyone know how this can be done? Googling always refers me to
> document_root, where absolute or relative.
>
> Do I first have to make a copy of the image and put it below doc_root?
>
> Thanks....
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>