note 95111 added to function.include

From: Date: Mon, 14 Dec 2009 10:39:47 +0000
Subject: note 95111 added to function.include
Groups: php.notes 
Request: Send a blank email to php-notes+get-163919@lists.php.net to get a copy of this message
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. ---- Server IP: 217.160.72.57 Probable Submitter: 80.150.73.4 ---- Manual Page -- http://www.php.net/manual/en/function.include.php Edit -- https://master.php.net/note/edit/95111 Del: integrated -- https://master.php.net/note/delete/95111/integrated Del: useless -- https://master.php.net/note/delete/95111/useless Del: bad code -- https://master.php.net/note/delete/95111/bad+code Del: spam -- https://master.php.net/note/delete/95111/spam Del: non-english -- https://master.php.net/note/delete/95111/non-english Del: in docs -- https://master.php.net/note/delete/95111/in+docs Del: other reasons-- https://master.php.net/note/delete/95111 Reject -- https://master.php.net/note/reject/95111 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#163919) next »