數(shù)據(jù)庫操作,{$tezheng}變量不能被解析。頁面報(bào)錯(cuò),解析為空。
$tezheng=$r['features']; //結(jié)果是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模板里面執(zhí)行,他最終會(huì)轉(zhuǎn)化為php語法 你這是直接在php里面寫程序,肯定不能用模板語法了,你用純php語法即可開源是一種精神,但不是義務(wù),幫忙是情分,不幫也不要抱怨,建議大家多研究代碼、多閱讀代碼、多翻閱社區(qū)歷史問題!