[thelist] PHP Functions

Santilal Parbhu santilal at scorpioneng.co.nz
Tue Dec 30 03:36:49 CST 2008


Hi

 

I am developing a site where there are multiple users.  For convenience I
have assembled the site so that the scripts used for each user are held in a
separate folder.  At present I have a master version of each script.  I then
copy each script, edit it for the each different user, and save it to each
folder.  This is a bit of a nightmare each time I get a new user.

 

I thought it would be more convenient to group all the common functionality
into user-created PHP functions, store then in a common area, and call them
from each script as required.  That way I would only need to have one
version of the common functions.  However, I have scoured the web to find
out how to do this and come up blank.  I understand that you can use
"include", but the included script needs to be in the same folder (I think).
I want to be able to call a function and tell the script where that function
is stored - i.e. call the function and specify the path to the function.

 

Is what I am trying to do achievable, sensible, or is there a better way to
do this?  Can anyone help me?  I am using PHP4.

 

Thanks.

 

 

Santilal Parbhu

 




More information about the thelist mailing list