我想知道是否有可能作出不同的动作渲染笨视图后,是这样的:动作之后呈现视图(笨)
public function my_function()
{
$data['var1'] = $this->make_one_action();
$data['var2'] = $this->make_other_action();
$this->load->view('a_view', $data);
//and now... more actions??
$this->make_dataBase_action();
}
我想要做的是过程的一些数据数据库,但不要等待用户进行此处理(当新视图不会向用户显示数据库上的这些操作时)。
,多一些......(一个不同的问题,但相关的),我可以做这样的事情:
public function my_function()
{
$data['var1'] = $this->make_one_action();
$data['var2'] = $this->make_other_action();
redirect(base_url()); //here is the difference
//and now... more actions??
$this->make_dataBase_action();
}
在这种情况下,我会想将用户重定向到一个新的一页,后在数据库上进行处理。
谢谢。
所以,你想把页面交给用户,然后*运行一些数据库查询? –
你好@RocketHazmat是的,这是我想要的。谢谢。 –