1、調(diào)用本系統(tǒng)單條數(shù)據(jù),示例(調(diào)用ID為1的信息,標題長度不超過25個漢字,顯示更新日期): {get sql="select * from phpcms_content where contentid=1" /} 標題:{str_cut($r[title], 50)} URL:{$r[url]} 更新日期:{date('Y-m-d', $r[updatetime])} 2、調(diào)用本系統(tǒng)多條數(shù)據(jù),示例(調(diào)用欄目ID為1通過審核的10條信息,標題長度不超過25個漢字,顯示更新日期): {get sql="select * from phpcms_content where catid=1 and status=99 order by updatetime desc" rows="10"} 標題:{str_cut($r[title], 50)} URL:{$r[url]} 更新日期:{date('Y-m-d', $r[updatetime])} {/get} 3、帶分頁,示例(調(diào)用欄目ID為1通過審核的10條信息,標題長度不超過25個漢字,顯示更新日期,帶分頁): {get sql="select * from phpcms_content where catid=1 and status=99 order by updatetime desc" rows="10" page="$page"} 標題:{str_cut($r[title], 50)} URL:{$r[url]} 更新日期:{date('Y-m-d', $r[updatetime])} {/get} 分頁:{$pages} 4、自定義返回變量,示例(調(diào)用欄目ID為1通過審核的10條信息,標題長度不超過25個漢字,顯示更新日期,返回變量為 $v): {get sql="select * from phpcms_content where catid=1 and status=99 order by updatetime desc" rows="10" return="v"} 標題:{str_cut($v[title], 50)} URL:{$v[url]} 更新日期:{date('Y-m-d', $v[updatetime])} {/get} 5、調(diào)用同一帳號下的其他數(shù)據(jù)庫,示例(調(diào)用數(shù)據(jù)庫為bbs,分類ID為1的10個最新主題,主題長度不超過25個漢字,顯示更新日期): {get dbname="bbs" sql="select * from cdb_threads where fid=1 order by dateline desc" rows="10"} 主題:{str_cut($r[subject], 50)} URL:http://bbs.phpcms.cn/viewthread.php?tid={$r[tid]} 更新日期:{date('Y-m-d', $r[dateline])} {/get} 6、調(diào)用外部數(shù)據(jù),示例(調(diào)用數(shù)據(jù)源為bbs,分類ID為1的10個最新主題,主題長度不超過25個漢字,顯示更新日期): {get dbsource="bbs" sql="select * from cdb_threads where fid=1 order by dateline desc" rows="10"} 主題:{str_cut($r[subject], 50)} URL:http://bbs.phpcms.cn/viewthread.php?tid={$r[tid]} 更新日期:{date('Y-m-d', $r[dateline])} {/get}