Re: files outside of the web tree
| From: | Jason Pruim | Date: | Wed, 27 Apr 2011 17:27:45 +0000 |
| Subject: | Re: files outside of the web tree | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-312503@lists.php.net to get a copy of this message | ||
Jason Pruim
On Apr 27, 2011, at 1:11 PM, Joshua Kehn <josh.kehn@gmail.com> wrote:
> On Wednesday, April 27, 2011 at 1:08 PM, Jim Giner wrote:
> I have managed to build include files and store them above my public folder
>> and the called pages manage to find them from the public folder and properly
>> include them. My problem is with the html src= attribute. I have uploaded
>> photos to be included in my web pages and I didn't want them in the web
>> tree so I moved them above it also. I use php to get the root folder's name
>> and then I add "../photos/" to the filename's path, but now my tags
>> can't
>> find them. Can I not do this?
>>
> Nope, static elements need to be stored in a web accessible directory. If you could access
> things by saying
../ then that would defeat the purpose of storing
> things where they aren't accessible.
>
Actually it is possible but not the way he was doing it... Look at dispatch model scripts I
believe.
Those (if my memory is correct) will allow you to serve files the way you are wanting to.