列表模型打勾 列表内容模板代码: 截取字数:$listtemp=' '.esub($r[newstext],100,'...').' '; ------------------------------------------------- 截取字数加过滤html代码
第一种 先赋值 $softsay =esub(strip_tags($fr[newstext]),100,'...'); 然后调用 $listtemp=' '.$softsay.' ';
第二种 直接调用 $listtemp=' '.esub(strip_tags($fr[newstext]),100,'...').' ';
------------------------------------------------------------- 说下调用 newstest 方法有两种:
方法1、把内容字段转存到主表(就是你的那种) 方法2、读取副表调用
①、列表模型打勾了 ②、代码: $fr=$empire->fetch1("select newstext from {$dbtbpre}ecms_news_data_{$bqr[stb]} where id='$bqr[id]'"); $listtemp=' 简介(截取内容页部分内容):'.esub($r[newstext],100,'...').' ';
像作者、来源等在副表的字段都可以这样调用
|