[thelist] PHP Functions
santilal at scorpioneng.co.nz
Tue Dec 30 14:33:22 CST 2008
Hi Blake, Jack
Thanks for the replies. It sounds like I have not explained what I am
trying to do very clearly. Let me try again.
The site is a sports admin site. User sports' codes like a hockey
association, football league, tennis association etc would use it. Each
code has its own area where the administrator can post results, draws and
notices. (Each code would have its own administrator.) The administrator
also has access to make new draws, edit draws, delete draws, enter teams,
edit team data, and so on. From the public pages the draws and results can
be seen, and the data can be sorted in a number of different ways. For
example the data can be displayed in date order, or based on a team (so that
you could get all the fixtures for a certain team only) and so on.
At present every user group (e.g. sport's code) will get its own area. I
have assembled all of the scripts for each code into a folder so that I can
find them easily, and to make adding a new user easier. I would just need
to copy the folder and make any customizing changes (which is relatively
easy to do). I have also developed the sorting and editing scripts into
functions. But presently I have a copy of each function in each folder.
What I want to do is to put all these functions into a single folder, so
that if I enhance any of the features in the functions, I only have to do it
once. This is why I would like to be able to specify the path to the
I hope this clarifies what I am trying to do. I am a self taught PHP
developer who has managed to get this site up and running after reading a
couple of books and gleaning lots of good advice from TheList. However, I
would be the first to admit that I might have done things in unorthodox
ways, simply because I didn't know any better way of doing things. I have
no idea what .htaccess is or how/where you would use it. It does sound
pretty powerful though, and I would like to find out more about it if anyone
can suggest a good book or website.
Thanks again for the advice.
From: thelist-bounces at lists.evolt.org
[mailto:thelist-bounces at lists.evolt.org] On Behalf Of Blake
Sent: Tuesday, 30 December 2008 11:23 p.m.
To: thelist at lists.evolt.org
Subject: Re: [thelist] PHP Functions
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.
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
> separate folder. At present I have a master version of each script. I
> 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
> into user-created PHP functions, store then in a common area, and call
> 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
> I want to be able to call a function and tell the script where that
> is stored - i.e. call the function and specify the path to the function.
* * Please support the community that supports you. * *
For unsubscribe and other options, including the Tip Harvester
and archives of thelist go to: http://lists.evolt.org
Workers of the Web, evolt !
More information about the thelist