calling a method in an included file

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
tommy1987
Forum Commoner
Posts: 92
Joined: Tue Feb 21, 2006 8:35 pm

calling a method in an included file

Post by tommy1987 »

I am trying to call a method in an included file, but it wont let me call it. The error it says is: call to undefined method.

I am puzzled since include should surely include the entire source of the file you choose to include.

If you cannot do this, how can I call a method in another PHP file because I want to keep PHP seperate from the rest of the page source since I am working on a page with another person that gets scared by PHP, that and it just gets in the way of the design.

Thanks, Tom
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Code please.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

First recommendation: check the spelling and case of the method name. Next recommendation: Make sure the include is actually including. Most important recommendation: Post some code so we can see what is happening.
Post Reply