PHPCMS快速建站系列之 pc標簽where中如何使用變量


{pc:content action="lists" catid="$catid" where="typeid='$t'" order="id DESC" num="30"}

如上代碼,模板解析時,總是把where="typeid='$t'"typeid='$t' 解析成字符串,不會解析$t變量

 

解決方法:

{php $where = "typeid=$t"}
{pc:content action="lists" catid="$catid" where="$where" order="id DESC" num="30"}

用字符串的方式傳遞where條件


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM