How can I change the welcome.php in Codeigniter to something like index.php?
<p>I'm currently learning Codeigniter. As you know, there is a default file called welcome.php in the controller when you first install the package. </p>

<p>I tried to modify that page to index.php, and here is the code:</p>

<pre><code>&lt;?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Index extends CI_Controller {
    public function index()
    {
        $this-&gt;load-&gt;view('welcome_message');
    }
}
</code></pre>

<p>I also changed the route.php in the config file:</p>

<pre><code>&lt;?php
defined('BASEPATH') OR exit('No direct script access allowed');
$route['default_controller'] = 'Index';
$route['404_override'] = '';
$route['translate_uri_dashes'] = FALSE;
</code></pre>

<p>Then I access the page by entering this path: <code>http://localhost/CI/index.php</code>, but it says there are two errors:</p>

<blockquote>
  <ol>
  <li>Message: Undefined property: Index::$load. Filename: controllers/Index.php</li>
  <li>Message: Call to a member function view() on null. Filename:controllers/Index.php</li>
  </ol>
</blockquote>

<p>Did I forget to change something else in order to make it work?</p>