3.2跨模块调用的问题

浏览:462 发布日期:2014/08/20 分类:求助交流
    
class IndexController extends Controller {
public function index(){

        
        $news    = M('News')->where('newsclass=1')->order('newsid_id desc')->limit(1)->select();
        $pic    = R('Pic/top');

    $this->assign("news",$news);
    $this->display();

    }
}


class PicController extends Controller{
    public function top()
    {
        $where = "status=1";

        $site = M('Pic')->where($where)->order('id desc')->select();

        $this->assign("site",$site);
        $this->display();
    }
}


R方法调用pic模块内的top方法后无法继续执行index方法下面的代码,求助大神给个方案解决此问题
最佳答案
评论( 相关
后面还有条评论,点击查看>>