当前位置:Gxlcms > PHP教程 > Parseerror:syntaxerror,unexpected'['inC:AppServwwwgenerate_order.ph,该怎么处理

Parseerror:syntaxerror,unexpected'['inC:AppServwwwgenerate_order.ph,该怎么处理

时间:2021-07-01 10:21:17 帮助过:9人阅读

Parse error: syntax error, unexpected '[' in C:\AppServ\www\generate_order.ph
这个问题出在哪里??
if (! $dsql->ExecuteNoneQuery ( $inQuery )) {
ShowMsg ( 'Database error!', '-1' );
exit ();
}

$mid = $dsql->GetOne ( "SELECT * FROM `#@__im_order` WHERE email = '$email' ORDER BY order_id desc" )["order_id"];
$OrdId = $mid;


------解决思路----------------------
你的 php 版本低于 5.4

改为
$mid = $dsql->GetOne ( "SELECT * FROM `#@__im_order` WHERE email = '$email' ORDER BY order_id desc" );
$OrdId = $mid["order_id"];

人气教程排行