数据库操作,{$tezheng}变量不能被解析。页面报错,解析为空。
$tezheng=$r['features']; //结果是str
$maxinfo= \Phpcmf\Service::M()->db->query("select max(startnum),min(startnum) from dr_1_zhgl where (userstate = 1) and (bignum = 1)
and (features = {$tezheng}) ")->getResultArray();
{$tezheng}这种语法只能在html模板里面执行,他最终会转化为php语法 你这是直接在php里面写程序,肯定不能用模板语法了,你用纯php语法即可