note 13697 deleted from function.require-once by irc-html
| From: | irc-html@php.net | Date: | Sat, 19 Jan 2002 19:34:28 +0000 |
| Subject: | note 13697 deleted from function.require-once by irc-html | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-25256@lists.php.net to get a copy of this message | ||
If you want to include() (or require()) some files relative to the current one, you can use the
constant __FILE__ like this:<br>
include(dirname(__FILE__) . '/../some_file.php');<br>
That works because __FILE__ is always set to the name of the current file, and not the name of the
script the browser requested.