You can also use the composer to simplify the process.
Make composer.json as follows
{ ... "autoload": { "psr-4": { "": "src/" } }, ... }
Get the composer from https://getcomposer.org/ and run composer install . You should load the autoload script composition once, for example
require_once __DIR__ . '/vendor/autoload.php';
If you have PHP less than 5.3.0, replace __DIR__ with dirname(__FILE__) .
And put your files in src folder. For example, if you have a class Acme\Utils\FooBar , then it should be in src/Acme/Utils/FooBar.php .
luchaninov
source share