Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Regular Coder
    Join Date
    Dec 2002
    Location
    Phoenix, Arizona, USA
    Posts
    148
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Lightbulb PHP.ini Includes QnA

    In the php.ini file for Win32 Includes, it sets;

    include_path = "C:\PHP\includes"

    Now having this, causes problems for many users using includes, I have seen some simply disable the line as such.

    ;include_path = "C:\PHP\includes"

    and

    include_path = ".;C:\PHP\includes"

    Now if using phpmailer, you need the includes directory active, so does the second line with the ".;C.... " simply allow both the user to set there own Includes folder and phpmailer to use the php includes folder?

    TYIA for any info on this.

  • #2
    Super Moderator
    Join Date
    May 2002
    Location
    Perth Australia
    Posts
    4,108
    Thanks
    11
    Thanked 101 Times in 99 Posts
    there is no reason to disable the include path , in fact it will cause more problems than it solves.

    The PHP incude_path directive works the as does PATH in windows or *NIX in that you can set multiple include paths..

    include_path = ".;C:\PHP\includes;c:\PHP\PEAR;C:\cygwin\bin"

    etc , the ';' is the delimiter on win32 , on *NIX it is ':' e.g.

    include_path = ".:/usr/local/php/includes:/usr/local/php/PEAR"

    also individual scripts can alter the include_path at runtime by using ini_set()

    PHP Code:
    <?
    $extra_path 
    '/home/user/my_funcs' ;
    ini_set'include_path' ini_get'include_path' ) . PATH_SEPARATOR $extra_path ) ;
    ?>
    (PATH_SEPARATOR is a predefined PHP constant you dont need to define it)
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)

  • #3
    Regular Coder
    Join Date
    Dec 2002
    Location
    Phoenix, Arizona, USA
    Posts
    148
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Lightbulb

    Understood, then what is the "." doing there? if the ; is a seperator, what is "." being used for? Does this allow both the user and php include directory to be active at the same time?

    That is what I am guessing at this point.

  • #4
    Super Moderator
    Join Date
    May 2002
    Location
    Perth Australia
    Posts
    4,108
    Thanks
    11
    Thanked 101 Times in 99 Posts
    Hi , the '.' translates to `look in the current working directory` e.g. relative to the calling script
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)

  • #5
    Regular Coder
    Join Date
    Dec 2002
    Location
    Phoenix, Arizona, USA
    Posts
    148
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thumbs up

    WEE I HAVE A BRAIN! That is about what I had thought, I figured that the ".;" was doing that, so what you said that ; was the seperator I was wishing that the . would force the script to look locally before looking at the php/includes.

    HE CAN BE THOUGHT!



  •  

    Posting Permissions

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