note 115290 added to function.autoload
| From: | romi | Date: | Sun, 29 Jun 2014 11:16:20 +0000 |
| Subject: | note 115290 added to function.autoload | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-199782@lists.php.net to get a copy of this message | ||
<?php
if(!function_exists('classAutoLoader')){
function classAutoLoader($class){
$class=strtolower($class);
$classFile=$_SERVER['DOCUMENT_ROOT'].'/include/class/'.$class.'.class.php';
if(is_file($classFile)&&!class_exists($class)) include $classFile;
}//You have to give the class name and not the class's path for the first parameter in
the class_exists()
}
spl_autoload_register('classAutoLoader');
?>
----
Server IP: 72.52.91.14
Probable Submitter: 82.31.57.125
----
Manual Page -- http://php.net/manual/en/function.autoload.php
Edit -- https://master.php.net/note/edit/115290
Del: integrated -- https://master.php.net/note/delete/115290/integrated
Del: useless -- https://master.php.net/note/delete/115290/useless
Del: bad code -- https://master.php.net/note/delete/115290/bad+code
Del: spam -- https://master.php.net/note/delete/115290/spam
Del: non-english -- https://master.php.net/note/delete/115290/non-english
Del: in docs -- https://master.php.net/note/delete/115290/in+docs
Del: other reasons-- https://master.php.net/note/delete/115290
Reject -- https://master.php.net/note/reject/115290
Search -- https://master.php.net/manage/user-notes.php