Showing images outside web root
On Tue, 11 Feb 2003 15:59:24 -0600, sik0fewl
You'll probebly need a content type header too
header ("Content-type: image/gif"); (or image/jpeg or image/png or
>> What's the best way to show images that are placed outside the web root that
>> works on Apache and IIS?
> $pic = $_REQUEST['pic'];
> readfile ($pic, "/path/to/my/images/");
>I think that should work okay, it might take some tweaking.
>I would make sure that it's not possible to go below the include dir
>(/path/to/my/images/) by passing pic=../../my.png, I don't think it is
>possible, however. You might want to strip the path off $pic just in case.
>Also, the user running the webserver needs read access to the