简体   繁体   中英

Laravel : FatalErrorException

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)

[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/8d74d14da5e7fbd7b4984adefddd5a1b is:

...
<div class="form-group">
    <?php echo Form::submit('save', ['class' => 'btn btn-primary']); ?>
</div>
...

Any ideas ?

Thank you

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() .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM