How do I make user defined functions available to multiple scripts ?
Everything I have seen on functions implies that they are used only in the script which contains them, which is not very useful, unless you have a repetitive task in that script.
I would like to use my functions in the same manner as PHP's built-in ones.
Thanks,
Function usage
Moderator: General Moderators
-
Mark Baker
- Forum Regular
- Posts: 710
- Joined: Thu Oct 30, 2008 6:24 pm
Re: Function usage
Put your functions in a separate .php file (e.g functions.php)
And include that file at the top of each script that needs to use any of the functions
And include that file at the top of each script that needs to use any of the functions