错误自定义助手laravel 5.2,自动加载文件错误


Error custom helper laravel 5.2, autoload files error

我已经创建了自定义助手laravel 5.2。我把文件夹App/Helpers/Global.php。

和自动加载文件。json:

"autoload": { 
   "files" : [
       "App/Helpers/Global.php"
   ]
}

在我的Windows PC上,它工作正常,但是当我部署到VPS centos时,我得到了这个错误。

PHP Warning:  require(/xxxx/xxxxx/public_html/xxxx/vendor/composer/../../App/Helpers/Global.php): failed to open stream: No such file or directory in /xxxx/xxxx/public_html/xxxx/vendor/composer/autoload_real.php on line 66

为什么自动加载"文件"是相对于供应商目录?提前谢谢。

错误自定义帮助器

看起来VPS上的操作系统与Windows不同,具有区分大小写的文件名文件系统。把"App/Helpers/Global.php"换成"app/Helpers/Global.php",应该会有帮助。