您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

做了一个无限评论,不知道咋样

2024/6/5 21:54:56发布38次查看
无限评论
html
{$info.title}
    {$info.con}
热门评论
{foreach $pl as $k => $vv}
{$vv.con}
{foreach $hpl as $k=>$h}
        {if $vv.id == $h.fid}
          {$h.con} 回复 {$h.fid}
{/if}
{/foreach}
{/foreach}
controllernamespace home\controller;
use think\controller;
class indexcontroller extends controller {
    public function index(){
        $info=m('neirong')->find();
        $pid=$info['id'];
        $pl=m('pinlun')->where(nid = $pid and fid=0)->select();
        $hpl=m('pinlun')->where(nid = $pid)->select();
        $this->assign(info,$info);
        $this->assign(pl,$pl);
        $this->assign(hpl,$hpl);
$this->display();
    }
     public function add(){
         $data=i('post.');
    $pl=m('pinlun')->add($data);
}表
ad:真正免费,域名+虚机+企业邮箱=0元
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product