Welcome Guest, Not a member yet? Register   Sign In
Message: Undefined property: Start::$config
#6

[eluser]timmahoney[/eluser]
The "Start" method you have in there is not getting run automatically. Try this:
Code:
<?php
class Start extends CI_Controller
{
var $base;
var $css;
function __construct()
{
  parent::__construct();
  $this->base = $this->config->item('base_url');
  $this->css = $this->config->item('css');
}
function hello($name = 'Guest')
{
  $data['css'] = $this->css;
  $data['base'] = $this->base;
  $data['mytitle'] = 'Welcome to this site';
  $data['mytext'] = "Hello, $name, now we're getting dynamic!";
  $this->load->view('testview', $data);
}
}


Messages In This Thread
Message: Undefined property: Start::$config - by El Forum - 08-21-2012, 10:59 AM
Message: Undefined property: Start::$config - by El Forum - 08-21-2012, 11:13 AM
Message: Undefined property: Start::$config - by El Forum - 08-21-2012, 11:15 AM
Message: Undefined property: Start::$config - by El Forum - 08-21-2012, 11:19 AM
Message: Undefined property: Start::$config - by El Forum - 08-21-2012, 11:26 AM
Message: Undefined property: Start::$config - by El Forum - 08-21-2012, 11:45 AM
Message: Undefined property: Start::$config - by El Forum - 08-21-2012, 11:51 AM
Message: Undefined property: Start::$config - by El Forum - 08-21-2012, 11:55 AM



Theme © iAndrew 2016 - Forum software by © MyBB