T_OBJECT_OPERATOR syntax error |
[eluser]CheekyGeek[/eluser]
Greetings all, Think I've finally wrapped my head around the concepts so ready to write some code and I can't even get my index view to load without getting an error: Here's the error message: Code: Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /Library/WebServer/Documents/CI/system/application/controllers/user2.php on line 20 Here's line 20: Code: this->load->view('user_search_form'); Code: <?php Thanks in advance. I need to get off of these T_OBJECT errors, whatever the heck they are.
[eluser]sophistry[/eluser]
you are missing the dollar sign in front of this. as in $this
[eluser]CheekyGeek[/eluser]
Oh Crikey. THANKS and sorry to bother the forum with such a dumb miss. :\ You'll be happy know that the following 5 or 6 errors were every bit as dumb (if not more so), but I solved them without troubling the forum!
[eluser]CheekyGeek[/eluser]
I'm stuck again, this time with another Code: Parse error: syntax error, unexpected T_STRING, expecting T_FUNCTION in /Library/WebServer/Documents/CI/system/application/models/users_model.php on line 9 Here is the model - what in the world is the problem with line 9? Code: <?php
[eluser]CheekyGeek[/eluser]
Solved it by turning on "invisibles" in BBEdit and saw there was a different character of some kind (not spaces or tabs). Did a BBEdit search and replace to get rid of the weird characters and replace with tabs and now it works. Anybody have any idea what they are or how they got there? I copied and pasted the model code from a tutorial web page. Image of the invisibles here: http://cgi.unk.edu/tmp/what-the.png I'm going to paste the characters in code to see if they show up here: Code: Edit: They don't show up, but if you drag your cursor you can select them.
[eluser]sophistry[/eluser]
that sometimes happens when you copy paste code from a web page. i use the bbedit function "Tools>Convert to ASCII..." to get rid of them. cheers.
[eluser]Unknown[/eluser]
[quote author="sophistry" date="1214273496"]you are missing the dollar sign in front of this. as in $this[/quote] whoa,, i miss the $ too,, by the way,, thanks.. |
Welcome Guest, Not a member yet? Register Sign In |