Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6820677
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T21:27:11+00:00 2026-05-26T21:27:11+00:00

I have a root configuration virtual directory (named config pointing to a directory inside

  • 0

I have a root configuration virtual directory (named “config” pointing to a directory inside /wwwroot/) specified in IIS7. I want to access this virtual dir programmatically via an “include” function such as:

include '/config/main.php';

I get Warning: require(config/main.php) [function.require]: failed to open stream errors. I have tried the following:

/config/, \config\, ./config/, config/, ~/config/, $SERVER_['DOCUMENT_ROOT']/config/

To no avail. Why does PHP have to be such a dink about site relative references!? Not to rain on the parade, but ASP can handle site relative references (or document relative with ../blah.php) with ease!

Any ideas? I have looked at the set_include_path function and I’m going to try that out in the meantime, but it basically seems like that would be hard-coding my directory paths – annoying for moving code from dev to prod environments.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T21:27:12+00:00Added an answer on May 26, 2026 at 9:27 pm

    Issue is sort of closed because I couldn’t find a satisfactory answer, I simply just rejigged my problem so that there’s no virtual directories. Damn PHP and relative paths! It seems to be a problem specifically with IIS.

    If anyone finds a better solution the problem I will be more than happy to switch the selected answer.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this log4j configuration in my grails config.groovy log4j = { error 'org.codehaus.groovy.grails.web.servlet',
I am using a machine on which I do not have root access and
I have a root view controller with no nib file, I tried adding this
I have configuration file, it has root category with two file appender. In the
I would like to have this setup in Tomcat: virtual host webapp resides directly
I have a WebSite and I woud like Deny Directory Browser from a web.config
I have the following code in my configuration file to establish the root path
I have a load of hierarchal static configuration data that I want to read,
I have a config file which lists all the configuration details for Logback.xml like
I have the following sample / test configuration that has Hudson create a directory

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.