/    Sign up×
Community /Pin to ProfileBookmark

How to Access folder above root directory of Add-on Domain?

Hey guys,

I’m new around here and just starting to dabble in PHP. I’m developing on a shared hosting plan right now where we will be hosting about 10 different sites that share a few common files. I want to put these files in a folder above the root of each add-on domain. Is there a php script that will allow me to access them?

Maybe I’m missing something easy here, but just putting in a direct path name doesn’t work. I didn’t think that would work anyway, but I’ve had no other ideas.

Thanks,
Marc

to post a comment
PHP

4 Comments(s)

Copy linkTweet thisAlerts:
@JustinOct 29.2008 — Well if putting the direct path doesn't work, the system may be set up to prevent you from accessing files outside your document root.

Are the permissions correct for the files you wish to allow access?

How much level of control do you have on this server? You could always set up symbolic links if it is a linux system to make it appear the folders are in their directories.
Copy linkTweet thisAlerts:
@YelgnidrocOct 29.2008 — As Justin says, ensure you can access the directory above the document root, if so you then want:

../directory/filename.ext
Copy linkTweet thisAlerts:
@topperharley122authorOct 29.2008 — The permissions are correct I believe on the documents themselves.

I ran a simple test. I setup a new folder/directory in the root public_html directory. I uploaded the site files and they worked correctly. This tells me all path names are functioning correctly.

However, when I load the files into the designated root directory for the add-on domain, the files within the directory load correctly, but the include files above the root add-on directory do not load.

Any thoughts?
Copy linkTweet thisAlerts:
@topperharley122authorOct 29.2008 — To clarify what I just posted, the folder structure is identical, the only difference is the naming, and the fact that one is a regular directory and the other is a document root directory.

-Marc
×

Success!

Help @topperharley122 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...