SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    Non-Member
    Join Date
    Jan 2003
    Posts
    5,748
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How do you set up multiple include paths?

    Hello,

    I can set up an include path via this,

    PHP Code:
    ini_set'include_path'dirname__FILE__ ).';' ); 
    But what if I want to set up more paths?

    The problem isn't how to setup those paths as such, but how to actually get those paths in question, such as how do I get the path that would reside above the path that

    PHP Code:
    dirname__FILE__ ); 
    Would be? Say the current path is for example,

    Code:
    www/public_html/web/
    And I wanted the additional path to be
    Code:
    www/
    How would I go about that?

  2. #2
    Keep it simple, stupid! bokehman's Avatar
    Join Date
    Jul 2005
    Posts
    1,935
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    *nix or windows?

  3. #3
    Non-Member
    Join Date
    Jan 2003
    Posts
    5,748
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    We both Windows and Unix servers are in use

  4. #4
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    UNIX: include_path = "/path1:/path2"

    Windows: include_path = "\path1;\path2"
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  5. #5
    Non-Member
    Join Date
    Jan 2003
    Posts
    5,748
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I know that... But;

    If I have one path, how would I get that given paths directory that would reside above that path? Ie

    Code:
    + htdocs
    + --- one
    + --- --- two
    + --- --- --- three
    So, using dirname( __FILE__ ) would return htdocs/three, how would I therefore get to htdocs/one? Based on using __FILE__ as the starting point...

    Hope that explains some more

  6. #6
    Non-Member
    Join Date
    Jan 2003
    Posts
    5,748
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nevermind; Fixed it now


Bookmarks

Posting Permissions

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