Laravel:致命错误异常
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/23772482/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Laravel : FatalErrorException
提问by johann
I have a log in page in my Laravel application which worked in local, but on the production server, I got the below error message (laravel.log)
我的 Laravel 应用程序中有一个在本地工作的登录页面,但在生产服务器上,我收到以下错误消息 (laravel.log)
[2014-05-21 01:07:31] production.ERROR: exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'syntax error, unexpected '['' in /home/users/xxxx/web/xxxxxm/app/storage/views/8d74d14da5e7fbd7b4984adefddd5a1b:24
Stack trace:
#0 [internal function]: Illuminate\Exception\Handler->handleShutdown()
#1 {main} [] []
Code generated in app/storage/views/8d74d14da5e7fbd7b4984adefddd5a1bis:
在app/storage/views/8d74d14da5e7fbd7b4984adefddd5a1b 中生成的代码是:
...
<div class="form-group">
<?php echo Form::submit('save', ['class' => 'btn btn-primary']); ?>
</div>
...
Any ideas ?
有任何想法吗 ?
Thank you
谢谢
回答by The Alpha
In this code
在这段代码中
echo Form::submit('save', ['class' => 'btn btn-primary']);
You have used []
for array and in your server the version of PHP
is probably lower than 5.4
. Check the version on your server or try changing the []
to array()
.
您已经使用[]
了数组,并且在您的服务器中的版本PHP
可能低于5.4
. 检查服务器上的版本,或尝试改变[]
来array()
。