php environment variable with windows IIS

Hello
how can I tell php to stay within the site instead of looking at the c:\drive when the include code is just set as (/common/php/scripts/noCe.inc)?

I tried setting the path within the php.ini but still not working
[PATH=c:\inetpub\php.domain.com]
include_path = “.;C:\php\pear;C:\inetpub\php.domain.com”;“C:\inetpub\php”

The path/filename for an include/require statement is a file system path. A leading / refers to the root of the current hard disk, not the document/domain root folder, and because you have used an absolute path, the include_path is not used.

Here’s the relevant information from the php.net documentation -

Files are included based on the file path given or, if none is given, the include_path specified. If the file isn't found in the include_path, include will finally check in the calling script's own directory and the current working directory before failing. The include construct will emit a warning if it cannot find a file; this is different behavior from require, which will emit a fatal error.

If a path is defined — whether absolute (starting with a drive letter or \ on Windows, or / on Unix/Linux systems) or relative to the current directory (starting with . or …) — the include_path will be ignored altogether. For example, if a filename begins with …/, the parser will look in the parent directory to find the requested file.

If you want to refer to the document/domain root folder, use $_SERVER[‘DOCUMENT_ROOT’] as a prefix to the path/filename.

Sponsor our Newsletter | Privacy Policy | Terms of Service