Welcome Guest, Not a member yet? Register   Sign In
Fatal error: Using $this when not in object context
#2

[eluser]coolfactor[/eluser]
Generally discouraged to do it that way. Do that in your controller, assign the value to a variable that you pass the view.

In your controller:
Code:
// get base_view variable
$data['base_view'] = $this->config->view('base_view');

// load header view
$data['header'] = $this->load->view('header', $data, TRUE);

// load main template
$this->load->view('template', $data);

In your header.php view:
Code:
<link href="<?=$base_view;?>style.css" rel="stylesheet" type="text/css">


Messages In This Thread
Fatal error: Using $this when not in object context - by El Forum - 08-12-2007, 03:38 PM
Fatal error: Using $this when not in object context - by El Forum - 08-12-2007, 04:15 PM
Fatal error: Using $this when not in object context - by El Forum - 08-13-2007, 04:04 AM
Fatal error: Using $this when not in object context - by El Forum - 08-13-2007, 10:04 AM
Fatal error: Using $this when not in object context - by El Forum - 08-13-2007, 04:15 PM
Fatal error: Using $this when not in object context - by El Forum - 08-13-2007, 04:49 PM
Fatal error: Using $this when not in object context - by El Forum - 08-13-2007, 04:51 PM
Fatal error: Using $this when not in object context - by El Forum - 08-13-2007, 04:52 PM
Fatal error: Using $this when not in object context - by El Forum - 08-14-2007, 01:39 AM
Fatal error: Using $this when not in object context - by El Forum - 08-14-2007, 03:45 AM
Fatal error: Using $this when not in object context - by El Forum - 08-14-2007, 09:36 AM
Fatal error: Using $this when not in object context - by El Forum - 08-14-2007, 02:01 PM
Fatal error: Using $this when not in object context - by El Forum - 08-14-2007, 02:04 PM
Fatal error: Using $this when not in object context - by El Forum - 08-14-2007, 02:08 PM
Fatal error: Using $this when not in object context - by El Forum - 08-14-2007, 02:22 PM
Fatal error: Using $this when not in object context - by El Forum - 08-14-2007, 03:20 PM
Fatal error: Using $this when not in object context - by El Forum - 08-15-2007, 03:30 PM
Fatal error: Using $this when not in object context - by El Forum - 08-15-2007, 04:12 PM
Fatal error: Using $this when not in object context - by El Forum - 08-16-2007, 02:30 AM
Fatal error: Using $this when not in object context - by El Forum - 08-26-2007, 05:26 PM



Theme © iAndrew 2016 - Forum software by © MyBB