免费资源网,https://freexyz.cn/ |
//帝国cms首页模板中的代码 [e:loop={'select * from [!db.pre!]ecms_news where firsttitle>0 and checked = 1 order by id DESC limit 0,1',9,24,0}] <? if ( strlen($bqr[title]) > 40 ){ $word=esub($bqr[title],40)."..."; }else{ $word=$bqr[title]; } ?> <a href="<?=$bqsr[titleurl]?>" class="index_header" title="<?=$bqr[title];?>" target="_blank" style="line-height: 30px;height:30px;letter-spacing: 1px;font-size: 24px; color: #000000; font-family: '黑体';"> <img src="/e/extend/wordtopic/index.php?word=<?=$word;?>" alert="<?=$bqr[title];?>" title="<?=$bqr[title];?>" width="710" height="50" /></a> [/e:loop]
更精确的应该是判断字数,然后更智能的显示。这只是在模板中截取固定字数,应该是最简单的办法了。
免费资源网,https://freexyz.cn/ |
赞
帝国cmsPS制作艺术文字PS制作立体文字
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。