$body=$lv->Display();经常有看到php源码里这么写,-> 这个标记一直不了解确切含义,请解释下。
提供详细介绍资料的加分。呵呵。

解决方案 »

  1.   

    看顺着代码去看到了调用了。但是这里$body= 赋值给他,好像米有效果。。
    类是dede的列表类。 //显示列表
    function Display()
    {
    if($this->TypeLink->TypeInfos['ispart']>0)
    {
    $this->DisplayPartTemplets();
    return ;
    }
    $this->CountRecord();
    if((empty($this->PageNo) || $this->PageNo==1)
    && $this->TypeLink->TypeInfos['ispart']==1)
    {
    $tmpdir = $GLOBALS['cfg_basedir'].$GLOBALS['cfg_templets_dir'];
    $tempfile = str_replace("{tid}",$this->TypeID,$this->Fields['tempindex']);
    $tempfile = str_replace("{cid}",$this->ChannelUnit->ChannelInfos['nid'],$tempfile);
    $tempfile = $tmpdir."/".$tempfile;
    if(!file_exists($tempfile))
    {
    $tempfile = $tmpdir."/".$GLOBALS['cfg_df_style']."/index_default.htm";
    }
    $this->dtp->LoadTemplate($tempfile);
    }
    $this->ParseTempletsFirst();
    $this->ParseDMFields($this->PageNo,0);
    $this->dtp->Display();

    }如果修改为,让他返回数据,而不是直接输出呢?因为我那边要赋值给$body
      

  2.   

    谢谢楼上的热心回答,我顺着又去搜索了下文件里的类,按照类名,返回去找到了这么一个函数,修改了下就OK了。呵呵。php不是很熟悉,大致能看懂一些简单的。谢谢楼上帮助。 function Display()
    {
    //echo $this->GetResult();
    return $this->GetResult();
    }