[eluser]gRoberts[/eluser]
Hi all,
I'm wondering whether it's something i'm doing wrong or not but the following code just produces a white page.
Code:
public static function TimedRedirect($Title, $Content, $Url, $Timeout = 5, $CI) {
//$CI =& get_instance();
$data = array();
$data['page_title'] = $Title;
$data['page_css'] = implode("\n", array(
'<link rel="stylesheet" type="text/css" media="screen" href="/assets/css/box.css" />'
));
$data['page_javascript'] = implode("\n", array());
$data['page_other'] = implode("\n", array(
'<meta http-equiv="refresh" content="'.$Timeout.';url='.$Url.'" />'
));
$data['Content'] = $Content;
$data['Url'] = $Url;
$data['Timeout'] = $Timeout;
$CI->load->view('common/site_box', $data);
exit();
}
As you can see I have commented out the get_instance call as that gave the same result (the example above passes the CI object by reference using $this).
I need to be able to quickly display a generic view (this is before any other views are loaded) but it seems that CI doesn't like what i'm doing, even though it looks as if it should work.
Has anyone got any idea's?
Cheers
Gavin