Fatal error: Using $this when not in object context in /var/www/h
Posted 04 June 2012 - 11:24 AM
I have an application I am writing where on most pages there is an $this->data value. I am also using an include() to fetch a globalVar.php which isolates changes to the code based on the URL of the page. But On simple pages - say a password reminder page which does not contain a $this->data value it throws this error.
Re: Fatal error: Using $this when not in object context in /var/www/h
Posted 04 June 2012 - 05:56 PM
I'm confused. You say you're writing it, but it has multiple instances of "$this->" in it and you don't know why you sometimes get an error. Do you know what an object is, or why you would use "$this->"?