例如文件在: app/Common/functions.php

 

找到app/bootstrap/autoload.php 文件在下面增加一行:

<?php

define('LARAVEL_START', microtime(true));

/*
|--------------------------------------------------------------------------
| Register The Composer Auto Loader
|--------------------------------------------------------------------------
|
| Composer provides a convenient, automatically generated class loader
| for our application. We just need to utilize it! We'll require it
| into the script here so we do not have to manually load any of
| our application's PHP classes. It just feels great to relax.
|
*/

require __DIR__.'/../vendor/autoload.php';
require __DIR__.'/../app/Common/functions.php';  // 新增加的文件

  

相关文章:

  • 2022-01-30
  • 2021-04-30
  • 2021-12-25
  • 2022-12-23
  • 2022-12-23
  • 2021-05-15
  • 2021-07-22
猜你喜欢
  • 2022-12-23
  • 2021-06-28
  • 2021-08-11
  • 2022-12-23
  • 2021-10-29
  • 2021-06-22
  • 2022-12-23
相关资源
相似解决方案