SitePoint Sponsor |
|
User Tag List
Results 1 to 2 of 2
-
Feb 12, 2009, 16:09 #1
- Join Date
- Sep 2000
- Posts
- 81
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Function Not Belonging to a Class?
I have a few classes, and then I want a function that really doesn't belong in any of the classes. I made a separate file, made my function, included the file, and then called the function. I get an error saying that I made a call to a member function without calling the class. There is no class.
I have myFunction() and then I call it by myFunction(); Is there something special I have to do to tell it that it's a function in the include file and not a method of any class?
-
Feb 12, 2009, 16:16 #2
- Join Date
- Apr 2008
- Location
- North-East, UK.
- Posts
- 6,111
- Mentioned
- 3 Post(s)
- Tagged
- 0 Thread(s)
Can you post the offending code?
@AnthonySterling: I'm a PHP developer, a consultant for oopnorth.com and the organiser of @phpne, a PHP User Group covering the North-East of England.
Bookmarks