我是靠谱客的博主 听话缘分,这篇文章主要介绍laravel 引入自定义文件,functions.php,现在分享给大家,希望可以做个参考。

例如文件在: 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';  // 新增加的文件

  

转载于:https://www.cnblogs.com/photo520/p/7280082.html

最后

以上就是听话缘分最近收集整理的关于laravel 引入自定义文件,functions.php的全部内容,更多相关laravel内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(32)

评论列表共有 0 条评论

立即
投稿
返回
顶部