note 36607 added to function.include-once
| From: | marvin at herbold-familyNOSPAM dot com | Date: | Thu, 16 Oct 2003 04:52:17 +0000 |
| Subject: | note 36607 added to function.include-once | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-58675@lists.php.net to get a copy of this message | ||
If you include_once ./classes/some_class.inc and also include_once ./classes/another_class.inc and
that another_class.inc file also does include_once ./some_class.inc, then some_class.inc ends up
getting included _twice_ which is probably not what you expected. It looks like include_once thinks
./classes/some_class.inc and ./some_class.inc are different files even though they are the same.
This is probably the way it was intended to work, but if you were surprised like me, then the way to
work around this is to use the define method instead.
----
Manual Page -- http://www.php.net/manual/en/function.include-once.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+36607
Delete -- http://master.php.net/manage/user-notes.php?action=delete+36607&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+36607&report=yes
Search -- http://master.php.net/manage/user-notes.php