note 95111 deleted from function.include by danbrown
| From: | danbrown@php.net | Date: | Mon, 14 Dec 2009 15:59:11 +0000 |
| Subject: | note 95111 deleted from function.include by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-163937@lists.php.net to get a copy of this message | ||
Note Submitter: Tobias Haupt
----
if you use chdir to include files relatively to other included files like anonymous stated
previously (18-Jan-2007 10:49):
Make sure that your php include_path configuration also lists the current directory (.). You can
ensure this with the following statement (if you can't change your php.ini at the first place):
<?php
// adds current working directory to include path
ini_set( 'include_path', ini_get( 'include_path' ).PATH_SEPARATOR.'.'
);
?>
Otherwise included paths will not be searched relatively to the working directory. This caused my a
little headache because i changed the php.ini and the include_path to include two different
directories (my lib directories) and forgot the '.'. Note that all files relatively to the
root file (index.php) will be included correctly even if you do not add the current directory (.) to
your configuration.