note 124202 added to language.oop5.autoload

From: Date: Tue, 17 Sep 2019 05:51:18 +0000
Subject: note 124202 added to language.oop5.autoload
Groups: php.notes 
Request: Send a blank email to php-notes+get-212237@lists.php.net to get a copy of this message
can somebody help me to change the __autoload() to spl_autoload_register() function __autoload($class) { $class = strtolower($class); //if call from within assets adjust the path $classpath = 'classes/class.'.$class . '.php'; if ( file_exists($classpath)) { require_once $classpath; } //if call from within admin adjust the path $classpath = '../classes/class.'.$class . '.php'; if ( file_exists($classpath)) { require_once $classpath; } //if call from within admin adjust the path $classpath = '../../classes/class.'.$class . '.php'; if ( file_exists($classpath)) { require_once $classpath; } } ---- Server IP: 208.43.231.9 Probable Submitter: 119.81.81.244 (proxied: 182.185.255.218) ---- Manual Page -- http://php.net/manual/en/language.oop5.autoload.php Edit -- https://master.php.net/note/edit/124202 Del: integrated -- https://master.php.net/note/delete/124202/integrated Del: useless -- https://master.php.net/note/delete/124202/useless Del: bad code -- https://master.php.net/note/delete/124202/bad+code Del: spam -- https://master.php.net/note/delete/124202/spam Del: non-english -- https://master.php.net/note/delete/124202/non-english Del: in docs -- https://master.php.net/note/delete/124202/in+docs Del: other reasons-- https://master.php.net/note/delete/124202 Reject -- https://master.php.net/note/reject/124202 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#212237) next »