【发布时间】:2017-06-12 06:26:20
【问题描述】:
我将我的字符串分开并将它们放在 textConstant.php 文件中的 Constant 目录中,在我的本地主机中一切正常,但是当我在服务器上上传我的代码时,字符串淡出并且我的屏幕上什么也没有显示,
这是我的常量文件:
return [
'title' => 'test',
'book' => 'book_test',
];
这是我使用常量的代码:
<button>{{config('Constants.textConstant.book')}}</button>
请帮我解决我的问题,因为我的网站无法使用,非常感谢 :)
【问题讨论】:
-
你能检查文件夹是否区分大小写是“常量”还是“常量”
-
将
<button>{{config('Constants.textConstant.book')}}</button>替换为<button>{{config('constant.textConstant.book')}}</button>,因为您的目录名称是Constant并且您在代码中使用Constants作为目录名称 -
它在你的本地机器上工作吗??
标签: laravel laravel-5.2 config constants