find();改为$System->where("keywords='$keywords'")->"/> find();改为$System->where("keywords='$keywords'")->">

Home >Backend Development >PHP Tutorial >thinkphp where话语中的变量不解析

thinkphp where话语中的变量不解析

WBOY
WBOYOriginal
2016-06-13 12:13:36864browse

thinkphp where语句中的变量不解析

解决办法:将where语句中的变量用单引号引起来就行了,亲测可用


举例:将$System->where("keywords=$keywords")->find();改为$System->where("keywords='$keywords'")->find();即可


原因:不明

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn