How to use functions from another php 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
User avatar
jdhorton77
Forum Commoner
Posts: 56
Joined: Tue Nov 07, 2006 3:29 pm
Location: Charlotte, NC

How to use functions from another php file

Post by jdhorton77 »

If I have some functions that I find are going to be used in multiple pages how do I link to them. Actually I think that's the tag I'm supposed to use. But when I was playing around with the link tag it didn't seem to work right. Am I supposed to use include()? Thanks for all of your help.
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Re: How to use functions from another php file

Post by John Cartwright »

jdhorton77 wrote:Am I supposed to use include()?
You got it.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Re: How to use functions from another php file

Post by RobertGonzalez »

jdhorton77 wrote:If I have some functions that I find are going to be used in multiple pages how do I link to them. Actually I think that's the tag I'm supposed to use. But when I was playing around with the link tag it didn't seem to work right. Am I supposed to use include()? Thanks for all of your help.
This is probably something you could have solved for yourself if you would have tried it. :wink:
User avatar
jdhorton77
Forum Commoner
Posts: 56
Joined: Tue Nov 07, 2006 3:29 pm
Location: Charlotte, NC

Post by jdhorton77 »

Well honestly I have tried it, but I used a link tag. That must be where I went wrong. But thanks anyway, I have to say, I love this site. You guys are very helpfull and I appreciate all that you do for us "newbies".
Post Reply