note 36607 deleted from function.include-once by sniper

From: Date: Tue, 04 Nov 2003 00:43:52 +0000
Subject: note 36607 deleted from function.include-once by sniper
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-59807@lists.php.net to get a copy of this message
Note Submitter: marvin@herbold-familyNOSPAM.com ---- 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.

« previous php.notes (#59807) next »