Created
July 15, 2020 15:57
-
-
Save metelica88/56b47e782066ae5ec28645e312c0f0be to your computer and use it in GitHub Desktop.
Автозагрузка классов index
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| spl_autoload_register(function($class) { | |
| $path = str_replace('\\', '/', $class. '.php'); | |
| if (file_exists($path)) { | |
| require $path; | |
| } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment