note 41904 deleted from function.include by nlopess
| From: | nlopess@php.net | Date: | Sun, 25 Apr 2004 18:12:40 +0000 |
| Subject: | note 41904 deleted from function.include by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-68795@lists.php.net to get a copy of this message | ||
Note Submitter: wrathdrakula@hotmail.com
----
Including one file through another may cause confusion. Include works as if you copy all code from
the new file and paste it in the first.
NOTE: All paths in files that are included must be relative to the file which calls them. i.e.:
3 files:
/main.php ; /dir/foo.php ; /dir/bar.php
main.php :
<?
print('Executing /main.php<BR>');
include('foo/one.php');
?>
foo.php :
<?
print('Executing foo/one.php');
include('bar.php'); // <-- Will not work.
include('dir/bar.php'); // <-- Will work.
?>
Cool eh?
~[D]