Rumah >pembangunan bahagian belakang >tutorial php >请问一直报错符号错误该怎么解决?
private $_specialWhiteList = [
<code> 'table' => 'table|tbody|thead|tfoot|tr|td|th' ]; 运行时老是报错syntax error, unexpected '[' 该怎么解决啊? </code>
private $_specialWhiteList = [
<code> 'table' => 'table|tbody|thead|tfoot|tr|td|th' ]; 运行时老是报错syntax error, unexpected '[' 该怎么解决啊? </code>
php版本太低,导致语法不兼容。
解决方法一、升级PHP到5.4以上
解决方法二、把[]
换成 array()