Php - Include PATH

> Procedural Languages > Php

1 - About

The include_path parameter specifies a list of directories where the:

  • require,
  • include,
  • fopen(),
  • file(),
  • readfile()
  • and file_get_contents()

functions look for files.

Advertising

3 - Syntax

The format is like the system's file PATH environment variable: a list of directories separated with a colon in Unix or semicolon in Windows.

4 - Ini

The value of the include path is defined in php.ini

;;;;;;;;;;;;;;;;;;;;;;;;;
; Paths and Directories ;
;;;;;;;;;;;;;;;;;;;;;;;;;

; UNIX: "/path1:/path2"
include_path=D:\xampp\php\pear
;
; Windows: "\path1;\path2"
;include_path = ".;c:\php\includes"
;
; PHP's default setting for include_path is ".;/path/to/php/pear"
; http://php.net/include-path

5 - Documentation / Reference