请选择 进入手机版 | 继续访问电脑版

discuz论坛程序调用主题帖子内容摘要代码方法教程

[复制链接]
查看2232 | 回复0 | 2020-2-9 08:19 | 显示全部楼层 |阅读模式
discuz论坛程序调用主题帖子内容摘要代码方法教程有两个,都比较简单,推荐使用第一个方法。第一个方法dz代码:
  1. <!--{eval require_once(DISCUZ_ROOT."./source/function/function_post.php");}-->
  2. <!--{echo messagecutstr(DB::result_first('SELECT `message` FROM '.DB::table('forum_post').' WHERE `tid` ='.$thread[tid].' AND `first` =1'),200);}-->
复制代码

第二个方法dz代码:
  1. <!--{eval $threadlist_message = DB::result(DB::query("SELECT message FROM ".DB::table('forum_post')." WHERE `tid` = $thread[tid] AND `first` =1"));}-->
  2. <!--{echo cutstr($threadlist_message,300)}-->
复制代码
自丢网推荐大家使用第一种方法即可。
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

UID
1
贡献
387
丢币
38902
主题
4607
回帖
116
注册时间
2018-9-25
最后登录
2024-3-30