简体   繁体   中英

PHP syntax error, unexpected '['

I never had this happen before, but here we go:

在此输入图像描述

Any ideas?

  • Running php-fpm 5.3
  • Ubuntu 12.04 (Precise Pangolin)

It looks as if the comment is NOT working...

Using [] as arrays like that only works with PHP 5.4 and up.

See PHP: Arrays

You'll have to use old array syntax for PHP 5.3.

This will work:

Route::get('/', array('as' => 'default.index', 'uses' => 'DefaultController@index'));

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