gotornot Posted October 8, 2010 Share Posted October 8, 2010 I have a lot of these in my script that work on my old server but dont on my new one. $this-> Is there a work around? I dont have the money i used to so cant afford a scripter to help and i can do basic php but i dont know what they are and google isnt much help 8-( Thanks Quote Link to comment https://forums.phpfreaks.com/topic/215443-this-bugs-me/ Share on other sites More sharing options...
PaulRyan Posted October 8, 2010 Share Posted October 8, 2010 This is what is known as PHP Classes (OOP - Object Orientated Programming) if I'm not mistaken. Take a look here... Link: http://php.net/manual/en/language.oop5.basic.php[/i]]http://php.net/manual/en/language.oop5.basic.php Regards, Paul. Quote Link to comment https://forums.phpfreaks.com/topic/215443-this-bugs-me/#findComment-1120304 Share on other sites More sharing options...
gotornot Posted October 8, 2010 Author Share Posted October 8, 2010 Thanks Paul I knew that i just wondered if i could replace the $this-> with something that would make the site work? Quote Link to comment https://forums.phpfreaks.com/topic/215443-this-bugs-me/#findComment-1120305 Share on other sites More sharing options...
PaulRyan Posted October 8, 2010 Share Posted October 8, 2010 Ohh right I See, my bad... mis-read original post bud. I've never ran into this problem, as I tend to shy away from Classes, I just don't like how they look when coded, I prefer using functions for anythingI need doing. This is just preference though, and also depnds on the job it needs to do... posting maybes the class and is usage may help someone to answer you question thoroughly Regards, Paul. Quote Link to comment https://forums.phpfreaks.com/topic/215443-this-bugs-me/#findComment-1120312 Share on other sites More sharing options...
PFMaBiSmAd Posted October 8, 2010 Share Posted October 8, 2010 What you do to fix a problem is dependent on what the problem is. Do you have a specific example (for all we can tell the $this-> in your code is there because it IS part of a class and your script is not working due to some other problem.) Quote Link to comment https://forums.phpfreaks.com/topic/215443-this-bugs-me/#findComment-1120314 Share on other sites More sharing options...
gotornot Posted October 8, 2010 Author Share Posted October 8, 2010 Thanks Peeps the problem is this: Fatal error: Using $this when not in object context in /home/q/u/quidfree/web/public_html/lib/emt-plugins/validatelink.php on line 19 It works on the old server which is running an older version of PHP but not the new one Quote Link to comment https://forums.phpfreaks.com/topic/215443-this-bugs-me/#findComment-1120316 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.