PHP头条
热点:

这异常跟PHP版本有关系


这错误跟PHP版本有关系?
服务器版本是5.4.3
我本机是5.3.1

Parse error: syntax error, unexpected '[', expecting ')' 
报错如下 

$userinfo = $this->getuser('getpk', [$uid], 'userinfo');//这里uid框起来就报错了

是否跟PHP版本有关系?? 分享到:
------解决方案--------------------
php5.4 [] 是 array() 的简写
------解决方案--------------------
PHP5.4提供了数组简短语法:

www.phpzy.comtrue/phprm/12987.htmlTechArticle这异常跟PHP版本有关系 这错误跟PHP版本有关系? 服务器版本是5.4.3 我本机是5.3.1 Parseerror:syntaxerror,unexpected'[',expecting')' 报错如下 $userinfo=$this->getuser('getpk',[$uid],'userinfo');//这里uid框起来...

相关文章

相关频道:

PHP之友评论

今天推荐