In the php.ini the include_path for windows systems looks something like this:

; UNIX: "/path1:/path2"
;include_path = ".:/php/includes"
;
; Windows: "\path1;\path2"
include_path=".;C:\php\PEAR"

I understand the paths themselves, but what does the ".:" mean in the Unix include path, and the ".;" mean in the Windows include path?

    The "." means the same in both - the current directory. For the UNIX paths, the colon is used as a separator, whereas for the windows paths the semicolon is used instead.

      As illustrated in the documenting comments. In Unix it's "path one, colon, path two", and in Windows it's "path two, semicolon, path two".

        Ok, to make sure I understand this correctly, if I wanted to include three paths on a windows machine I would use:

        include_path=".;C:\php\includes;C:\wamp\;C:\files";

        and on UNIX I would use:
        include_path=".:/php/includes:/wamp:/files";

        and each of these statements would include not only php\includes, wamp, and files folders, but also the folder the php.ini is located in, because of the "."?

          The "." refers to the current working directory (i.e. the directory where the PHP interpreter was invoked). This is unlikely to be the directory where php.ini is located.

            Write a Reply...