开发者

loading view in codeigniter

开发者 https://www.devze.com 2023-03-11 08:07 出处:网络
HI I have a codeigniter controller called CIcontroller and I have a method say redirectmethod in the redirectmethod i have some code and then i do this

HI I have a codeigniter controller called CIcontroller and I have a method say redirectmethod

in the redirectmethod i have some code and then i do this

$data['redirect_page'] = 'page_name';
$this->load->view('template_view',$开发者_如何学JAVAdata);

the template view basically loads header footer and the corresponding view as specified by the data parameter

Now everything works fine but my url has value http:\\blabla\CIcontroller\redirectmethod instead of http:\\blabla\page_name

could anyone help me fix this thing


You need to emit a Location header to tell the browser to load a different page. See redirect in the url helper.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号