首页 > opencart controller 输出数据

opencart controller 输出数据

controller:    $this->response->setOutput($this->load->view('common/login', $data));

respone:
    public function setOutput($output) {
        $this->output = $output;
    }

数据是怎么输出的?

https://github.com/opencart/opencart/blob/master/upload%2Fsystem%2Fframework.php#L105

$response->output()


1.把控制器中$data数组extract()和模版文件的内容放到$output;
2.入口文件处,index.php最后一行,$response->output(),输出内容!

【热门文章】
【热门文章】