note 22937 added to function.include-once

From: Date: Thu, 04 Jul 2002 16:29:07 +0000
Subject: note 22937 added to function.include-once
Groups: php.notes 
Request: Send a blank email to php-notes+get-32592@lists.php.net to get a copy of this message
It seems like the appropriate answer to the case sensitivity problem in the require/include functions in Win32 is to wrap the function as such: function win_require_once($whatfile) { return require_once(strtoupper($whatfile); } Not only does this guarantee that all file handles passed it will be tracked correctly despite case, but also, this sort of handling dodges the issue with old DOS programs which typically overwrite filenames in uppercase on saving (important if you're dealing with legacy systems) -- http://www.php.net/manual/en/function.include-once.php http://master.php.net/manage/user-notes.php?action=edit+22937 http://master.php.net/manage/user-notes.php?action=delete+22937 http://master.php.net/manage/user-notes.php?action=reject+22937

« previous php.notes (#32592) next »