|
Posted by Malcolm Dew-Jones on 11/07/05 04:11
juglesh (jugleshjunk@hotmail.com) wrote:
: Oli Filth wrote:
: > juglesh said the following on 06/11/2005 18:28:
: > > hello, here is my dir structure:
: > >
: > > /private
: > > mainaction.php
: > > img.jpg
: > >
: > > /public_html
: > > index.php
: > >
: > > in index.php, I include mainaction.php. In mainaction.php, i want to
: > > have
: > > <img src='<?php insertImageHere ?>' > and have img.jpg show in
: > > index.php.
: >
: > If the image file is in a private directory, it can't be accessed by the
: > outside world, hence it can't be seen in a browser...
: not directly, no, but can i do some thing with header() etc.?
No.
The file must be in an accessible place.
You mentioned having a public directory with links to the "real" copy of
each "private" file. That technique would work.
OR - consider _copying_ the private file to the public location. That way
you can edit a private copy ahead of time and then "publish" it when ready
(by copying to the public area). That might be more secure as there would
be less that could go wrong to allow the web server to serve anything not
in the public area. ($0.10)
--
This programmer available for rent.
Navigation:
[Reply to this message]
|