Page 1 of 1
Syntax for external functions
Posted: Mon Aug 21, 2006 4:37 pm
by ngungo
How to make functions only file like a library, then call them externally. I appreciate someone give me a rope. Thanks.
Posted: Mon Aug 21, 2006 4:41 pm
by feyd
Call them externally? Where would one do such a thing?
Posted: Mon Aug 21, 2006 4:51 pm
by Chris Corbyn
~ngungo what do you mean externally? Do you just mean from outside of the same file?
You can just use require() for that.
Posted: Mon Aug 21, 2006 7:27 pm
by ngungo
I got it work now. I have a question though.
Are require() and include() interchageable?
Posted: Mon Aug 21, 2006 7:48 pm
by shiznatix
read the manual on them. in the short, include will throw an error but not kill the script if i cant find the file. require will kill the script if it can not find the file. i recommend require_once() for all your requireing needs
edit: .....did I just beat feyd!?
Posted: Mon Aug 21, 2006 7:49 pm
by feyd
There are some slight differences as reading the manual pages on them will detail. As far as most things are concerned, they are interchangeable.
Posted: Mon Aug 21, 2006 8:19 pm
by ngungo
Thanks guys! I did read but ... lack of confidence.