I'm hosting a standard website from http://www.versio.nl/
and I'm always getting the error Parse: syntax error, unexpected '['
. I would have to change all the []
array notifications with array()
. But is there a possiblity that I can change a setting or so? Or could it be they still work with an old version of PHP? (Looks strange to me)
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
only php 5.4.x and up works with the new shorthand array syntax, if your server version is lower then 5.4 then there's no way to make it work, you'll need to change the syntax to the old syntax.
you could try to see the version using
echo phpinfo();