note 112852 deleted from function.spl-autoload by crell
| From: | crell@php.net | Date: | Mon, 04 Apr 2022 16:27:11 +0000 |
| Subject: | note 112852 deleted from function.spl-autoload by crell | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-218051@lists.php.net to get a copy of this message | ||
Note Submitter: noum77
----
Mine is simplier, and without include/require:
function autoload($className) {
set_include_path('./library/classes/');
spl_autoload($className); //replaces include/require
}
spl_autoload_extensions('.class.php');
spl_autoload_register('autoload');