note 52734 added to function.include

From: Date: Wed, 11 May 2005 09:14:07 +0000
Subject: note 52734 added to function.include
Groups: php.notes 
Request: Send a blank email to php-notes+get-89252@lists.php.net to get a copy of this message
'.'(dot) in include_path seems not always mean the directory where the INCLUDER exists. arrange simple scripts, like this: |-- includer.php |-- includee_3.inc `-- subdir/ |-- includee_1.inc |-- includee_2.inc `-- includee_3.inc here: ----------------------------- ./includer.php <?php echo(get_include_path() . '<br />'); include('./subdir/includee_1.inc'); ?> ----------------------------- ----------------------------- ./subdir/includee_1.inc <?php include('includee_2.inc'); include('includee_3.inc'); ?> ----------------------------- ----------------------------- ./subdir/includee_2.inc, ./subdir/includee_3.inc, ./includee_3.inc (all the same) <?php echo(__FILE__ . '<br />'); ?> ----------------------------- OUTPUT: ----------------------------- .:/usr/local/lib/php/ /full/path/to/subdir/includee_2.inc /full/path/to/includee_3.inc ----------------------------- did you know? ---- Manual Page -- http://www.php.net/manual/en/function.include.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+52734 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+52734&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+52734&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+52734&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+52734&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+52734&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+52734&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#89252) next »