Correct use of include_path in php.ini?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
PhpDog
Forum Commoner
Posts: 58
Joined: Mon Jan 14, 2008 10:23 am

Correct use of include_path in php.ini?

Post by PhpDog »

I am running Apache server, with php as a loaded module. My script is situated in:

C:\Program Files\Apache Group\Apache2\htdocs\aruk\

and it needs to access another file, via 'include' in:

C:\Program Files\Apache Group\Apache2\htdocs\aruk\includes\

My script uses: 'include("./includes/config.php");'

In my php.ini file I have the include_path set to:

C:\Program Files\Apache Group\Apache2\htdocs\aruk\includes\

which isn't working for me. My script cannot locate the config.php file as it should.

What should my include_path be set to in php.ini in order for it to work correctly please?
User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

Re: Correct use of include_path in php.ini?

Post by Ambush Commander »

Prepend a ".;" to your include_path. The . ensures that your current path is searched too!
Post Reply