note 79611 added to language.oop5.autoload

From: Date: Wed, 05 Dec 2007 15:46:38 +0000
Subject: note 79611 added to language.oop5.autoload
Groups: php.notes 
Request: Send a blank email to php-notes+get-132848@lists.php.net to get a copy of this message
I've made this little script here which looks in a dir, and loads all the classed, and includes their files. $myDirectory = opendir("required/classes"); // get each entry while($entryName = readdir($myDirectory)) { $dirArray[] = $entryName; } // close directory closedir($myDirectory); // count elements in array $indexCount = count($dirArray); sort($dirArray); for($index=0; $index < $indexCount; $index++) { if($dirArray[$index] != '.' AND $dirArray[$index] != '..') { include("required/classes/$dirArray[$index]"); $classname = strtolower($dirArray[$index]); $classname = str_replace('.php','',$classname); $classinit = str_replace('.php','',$dirArray[$index]); $$classname = new $classinit; } } ---- Server IP: 194.145.210.3 Probable Submitter: 86.31.149.158 ---- Manual Page -- http://www.php.net/manual/en/language.oop5.autoload.php Edit -- https://master.php.net/note/edit/79611 Del: integrated -- https://master.php.net/note/delete/79611/integrated Del: useless -- https://master.php.net/note/delete/79611/useless Del: bad code -- https://master.php.net/note/delete/79611/bad+code Del: spam -- https://master.php.net/note/delete/79611/spam Del: non-english -- https://master.php.net/note/delete/79611/non-english Del: in docs -- https://master.php.net/note/delete/79611/in+docs Del: other reasons-- https://master.php.net/note/delete/79611 Reject -- https://master.php.net/note/reject/79611 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#132848) next »