Answer the question
In order to leave comments, you need to log in
How do you like this autoload for PHP?
Take a moment to bike a little for a small project
There are files
/Core.php
/Map.php
/custom/Class.php
The autoload function is defined, which will take the path to the class file from Map.php
When developed, Map.php looks like this:
<?
class Map
{
public static $inited = false;
}
?>
$map = [
'Class' => '/custom/'
];
Answer the question
In order to leave comments, you need to log in
Everything has already been invented for you www.php-fig.org/psr/psr-4
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question