Welcome Guest, Not a member yet? Register   Sign In
Nettuts Day1 - Parse error in first 8 minutes
#1

[eluser]ktufore[/eluser]
Hi,

I'm new to Codeigniter and I'm excited to get to working on it. I'm noticing that there are a few differences in the CI versions from what is current to what the video authors were working with. I'm certain that is where my confusion is stemming from. Here is my hangup:

I am trying to follow along with the first Jeffery Way "Day 1" video on Nettuts and I am receiving the following error:

Code:
( ! ) Parse error: syntax error, unexpected T_STRING, expecting '{' in C:\wamp\www\ci\application\controllers\site.php on line 3
Call Stack
#    Time    Memory    Function    Location
1    0.0012    699016    {main}( )    ..\index.php:0
2    0.0036    780888    require_once( 'C:\wamp\www\ci\system\core\CodeIgniter.php' )    ..\index.php:198

Here is the code I used:
Code:
<?php

class Site extents CI_Controller {

    function index()
    {
        echo 'Hello World';
    }
        

}

The only difference between Jeffery's code and mine is that I am using CI_Controller. I've typed the same URL he did and I get the above error. Where am I going wrong?

Thanks!
#2

[eluser]kcmerrill[/eluser]
it's extends, not extents ...


So:
class Site extends CI_Controller
#3

[eluser]ktufore[/eluser]
[quote author="kcmerrill" date="1301109019"]it's extends, not extents ...


So:
class Site extends CI_Controller[/quote]

How embarrassing. Thank you for being kind!




Theme © iAndrew 2016 - Forum software by © MyBB