Jump to content

Accessing files outside of www folder


Crimpage

Recommended Posts

Hi All,

I use the e-dir script to show folder contents etc... I have modded the hell out of it for my own use, including having a variable starting directory.

In the script, you can set the start directory to be whatever you like, including something outside of the apache/iis wwwroot folder. However when the script generates the html link to the file it will look like it is a subdirectory of the wwwroot folder, and therefor the file does not exist. It's a little confusing.

Let say my wwwroot folder is at:
c:\wamp\www
and i have the script pointing my start directory to
d:\
the script will show everything from my D drive. all well and good. But, when I click on one of the files it links to:
http://server/file.jpg
which apache thinks is at c:\wamp\www\file.jpg

Is there anyway of making php or apache pull files from outsite of the wwwroot folder on the fly or does everything need to be within the wwwroot folder?

Cheers,
Dave
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.