Welcome Guest, Not a member yet? Register   Sign In
echo redirection
#2

[eluser]term25[/eluser]
page_url'pages/home'is wrong

you can use instead

Code:
base_url('pages/home');

or

Code:
site_url('pages/home');

btw. you need to use
Code:
die();
after the echo in your controller if you want to stop execution the code and check what is the problem when debugging like:

Code:
echo base_url('pages/home');
die();

The other way is to send the value to your view like:

Code:
$data_to_send_to_view = base_url('pages/home');
$this->load->view('your-view', $data_to_send_to_view);

And in your view output like:
Code:
echo $data_to_send_to_view;


Messages In This Thread
echo redirection - by El Forum - 09-13-2012, 12:18 PM
echo redirection - by El Forum - 09-13-2012, 12:38 PM



Theme © iAndrew 2016 - Forum software by © MyBB