php.ini include syntax - what does .: or .; mean?
Results 1 to 5 of 5

Thread: php.ini include syntax - what does .: or .; mean?

  1. #1
    Junior Member
    Join Date
    Jan 2014
    Posts
    12

    php.ini include syntax - what does .: or .; mean?

    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?

  2. #2
    Pna lbh ernq guvf¿
    Join Date
    Jul 2004
    Location
    Kansas City area
    Posts
    19,432
    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.

  3. #3
    Pedantic Curmudgeon Weedpacket's Avatar
    Join Date
    Aug 2002
    Location
    General Systems Vehicle "Thrilled To Be Here"
    Posts
    21,904
    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".
    THERE IS AS YET INSUFFICIENT DATA FOR A MEANINGFUL ANSWER
    FAQs! FAQs! FAQs! Most forums have them!
    Search - Debugging 101 - Collected Solutions - General Guidelines - Getting help at all

  4. #4
    Junior Member
    Join Date
    Jan 2014
    Posts
    12
    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 "."?

  5. #5
    Pna lbh ernq guvf¿
    Join Date
    Jul 2004
    Location
    Kansas City area
    Posts
    19,432
    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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •