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方法下面的代码,求助大神给个方案解决此问题
最佳答案