Common PHPCMS Tag calls
1, call the system single data
(Call the information with ID 1, the title length of not more than 25 kanji, display the update date):
- "SELECT * from Phpcms_content where contentid=1"/}
- Title: {str_cut ($r [title],)} url:{$r [URL]}
- Update Date: {date (' y-m-d ', $r [UpdateTime])}
2, call the system more than one data
(Call column ID 1 through the audit of 10 information, the title length of not more than 25 kanji, display update date):
- "SELECT * from Phpcms_content where catid=1 and status=99 order by updatetime Desc" rows="}
- ' y-m-d ', $r [UpdateTime])}
- {/get}
3, with paging
(Call column ID 1 through the audit of 10 information, title length of not more than 25 kanji, display update date, with pagination):
- "SELECT * from Phpcms_content where catid=1 and status=99 order by updatetime Desc" rows="ten" page="$page"} /c2>
- ' y-m-d ', $r [UpdateTime])}
- {/get}
Paging: {$pages}
4. Custom return variables
(Call column ID 1 through the audit of 10 information, the title length of not more than 25 Chinese characters, display the update date, the return variable is $v):
- "SELECT * from Phpcms_content where catid=1 and status=99 order by updatetime Desc" rows="ten" return="V"}
- ' y-m-d ', $v [UpdateTime])}
- {/get}
5. Call other databases under the same account
(Call database for BBS, category ID 1 of the 10 latest theme, the theme length of not more than 25 kanji, display the update date):
- "BBS" sql="select * from Cdb_threads where fid=1 order by dateline Desc" rows="}
- bbs.phpcms.cn/viewthread.php?tid={$r [tid]} Update Date: {date (' y-m-d ', $r [Dateline])}
- {/get}
6. Calling external Data
(Call the data source for BBS, category ID 1 of the 10 latest topics, the theme length of not more than 25 kanji, display the updated date):
- "BBS" sql="select * from Cdb_threads where fid=1 order by dateline Desc" rows="}
- bbs.phpcms.cn/viewthread.php?tid={$r [tid]} Update Date: {date (' y-m-d ', $r [Dateline])}
- {/get}
phpcms V9 Get tags various call code brocade set
Original title: Phpcms v9 Get Call label collation
Original address: http://www.abcde.cn/info/show-23-885-1.html
copyright network times All, reprint please indicate the source