Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $requireAutoloader = function() {
- $autoloaderLocations = [
- __DIR__ . '/../../autoload.php',
- __DIR__ . '/../vendor/autoload.php',
- __DIR__ . '/vendor/autoload.php'
- ];
- foreach($autoloaderLocations as $location) {
- if(is_file($location)) {
- require_once $location;
- return;
- }
- }
- fprintf(STDERR, 'You must set up the project dependencies using `composer install`' . PHP_EOL);
- fprintf(STDERR, "See https://getcomposer.org/download/ for instructions on installing Composer" . PHP_EOL);
- exit(1); // General error.
- };
- $requireAutoloader();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement