views:

41

answers:

2

I have this line in php.ini

include_path = ".;C:\xampp\htdocs\zend\library;C:\xampp\php\PEAR"

What exactly is the . in front of the string?

And what does the line do, exactly? I know it includes the paths, but what exactly happens behind the scenes? Maybe this is a dumb question but I'm asking anyway :-)

+2  A: 

The '.' is used to denote the current working directory of the script.

In terms of the general purpose of the line, it basically tells PHP where to look for files when you use an require or include statement (or a variation thereof such as the usually more useful require_once or include_once).

middaparka
+4  A: 

. adds the current working path to the include path

What all this does is that if you say:

Include ( 'some_file.php' );

PHP will look for that file in the directories specified in the "include_path". It will look in the order you specify the directories.

Jan Hančič