Welcome Guest, Not a member yet? Register   Sign In
controllers/News.php
#1

I am busy to teach myself Codeigniter and to lean it form the Codeigniter website.

And I keep on getting this error code when trying to test run the news.php page.

 An uncaught Exception was encountered
Type: ParseError
Message: syntax error, unexpected '$this' (T_VARIABLE)
Filename: C:\wamp64\www\aircomp.co.za\application\controllers\News.php
Line Number: 9
Backtrace:
File: C:\wamp64\www\aircomp.co.za\index.php
Line: 315


Please could somebody help me.

Angry
Reply
#2

The error message says there is a syntax error on line 9 of your News controller.
Share the code for that and we can point you in the right direction.
Reply
#3

Hi there.

here is the screen hot of my code.

Attached Files Thumbnail(s)
   
Reply
#4

You have misspelled "database" as "databse" in line 8.
Reply
#5

Thanks for coming back to me asap. Now it say's there is a error on line 9 which is empty.

Please see attached screen shots.

Attached Files Thumbnail(s)
       
Reply
#6

You have a typo on line 18 with result
Codeigniter is simply one of the tools you need to learn to be a successful developer. Always add more tools to your coding arsenal!
Reply
#7

So I can delete } online in controllers/News.php. Is this correct ?
Reply
#8

(04-29-2019, 07:13 AM)albertleao Wrote: You have a typo on line 18 with result

I am still getting errors as I have followed all the instructions from the Manuel.

Attached Files Thumbnail(s)
       
Reply
#9

And also a typo on line 13: $sluig
Reply
#10

You deleted the vurly brace at the end of the index method, before line 18.
You need to proof-read your code before jumping to the conclusion that CI is broken.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB