[thelist] PHP Functions

Blake haswell00 at gmail.com
Tue Dec 30 04:23:19 CST 2008

Why do you need a separate script for each user?

This sounds like something you could use $_GET for, but I don't quite
understand what you want to do.

As for include you can use relative or absolute paths, so your include
file can be anywhere.


Blake Haswell
http://www.blakehaswell.com/ | http://blakehaswell.wordpress.com/

On Tue, Dec 30, 2008 at 8:36 PM, Santilal Parbhu
<santilal at scorpioneng.co.nz> wrote:
> 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.

More information about the thelist mailing list