note 22524 deleted from function.require-once by sniper
| From: | sniper@php.net | Date: | Tue, 04 Nov 2003 00:45:49 +0000 |
| Subject: | note 22524 deleted from function.require-once by sniper | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-59828@lists.php.net to get a copy of this message | ||
Note Submitter: rnakamot@hotmail.com
----
require_once seems to check whether the file is to included by the string that you pass to the
function, as opposed to the absolute path of the file. Thus, for example if you have a file at:
/home/a.php
And executed the following statements from a file in /home/ :
require_once("a.php");
require_once("/home/a.php");
a.php would be included twice in that file, potentially causing problems in your code that depend on
the file being only included once.