autoload.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. define('LARAVEL_START', microtime(true));
  3. /*
  4. |--------------------------------------------------------------------------
  5. | Register The Composer Auto Loader
  6. |--------------------------------------------------------------------------
  7. |
  8. | Composer provides a convenient, automatically generated class loader
  9. | for our application. We just need to utilize it! We'll require it
  10. | into the script here so that we do not have to worry about the
  11. | loading of any our classes "manually". Feels great to relax.
  12. |
  13. */
  14. require __DIR__.'/../vendor/autoload.php';
  15. // 引入自定义函数库
  16. require __DIR__.'/../app/Libs/functions/common.php';
  17. require __DIR__.'/../app/Libs/functions/log_helper.php';
  18. require __DIR__.'/../app/Libs/functions/Helpers.php';
  19. // 引入自定义类
  20. // TODO 这个类有自动加载吗
  21. require __DIR__.'/../vendor/league/flysystem/src/Config.php';
  22. /*
  23. |--------------------------------------------------------------------------
  24. | Include The Compiled Class File
  25. |--------------------------------------------------------------------------
  26. |
  27. | To dramatically increase your application's performance, you may use a
  28. | compiled class file which contains all of the classes commonly used
  29. | by a request. The Artisan "optimize" is used to create this file.
  30. |
  31. */
  32. $compiledPath = __DIR__.'/cache/compiled.php';
  33. if (file_exists($compiledPath)) {
  34. require $compiledPath;
  35. }