diff --git a/eesyphp b/eesyphp index 5d18956..7b7059e 100755 --- a/eesyphp +++ b/eesyphp @@ -4,6 +4,14 @@ use EesyPHP\App; use EesyPHP\Cli; -require __DIR__."/vendor/autoload.php"; +if (isset($_composer_autoload_path)) + require $_composer_autoload_path; +else if (file_exists(__DIR__ . '/../../autoload.php')) + require __DIR__ . '/../../autoload.php'; +else if (file_exists(__DIR__ . '/../vendor/autoload.php')) + require __DIR__ . '/../vendor/autoload.php'; +else + die('Fail to find composer vendor/autoload.php file'); + App::init(null, null, __DIR__); Cli :: handle_args();