note 57000 deleted from function.include by aidan
| From: | aidan@php.net | Date: | Sat, 15 Apr 2006 16:30:53 +0000 |
| Subject: | note 57000 deleted from function.include by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-108154@lists.php.net to get a copy of this message | ||
Note Submitter: rainfalling at yahoo dot com
----
This is yet another way to include files relative to the current file. I find it easier if you have
a lot of includes.
<?php
$prewd = getcwd(); // get the current working directory
chdir(realpath(dirname(__FILE__))); // change working directory to the location of this file
include('includedfile.php'); // include relative to this file
chdir($prewd); // change back to previous working dir
?>