skip to Main Content

I know that you need to enable parent paths in order to include files in a parent directory, however I have no way of enabling this property on godaddy’s plesk hosting. Is there any way around this or do I just need to upload the include files into each and every directory on my site.

The idea of the include files was that I would have less that needed maintaining, and if I need to upload them into every folder then I certainly don’t have less to maintain.

Thank you for the help.

2

Answers


  1. You can include files that are “higher up” in the folder hierarchy, you just can’t use the file="../../" syntax. Instead, use “virtual” instead of “file” and specify the full path relative to the site’s root:

    <!-- #include virtual="/path/to/includes/filename.inc" -->
    

    This has the added advantage of always being the same path, regardless of where you’re including it, so you can copy & paste to your heart’s content.

    Of course, this will require editing every page that has includes in it, but since you were going to do that anyway, I gather this is not an issue.

    Login or Signup to reply.
  2. Here is the way to allow parent path in plesk shared hosting, for example: godaddy

    1. Go to Virtual Directories
    2. Find Directory Properties under Tools section, click on it
    3. Tick Allow to use parent paths checkbox under Application settings section

    Hope this helps.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search