Re: Common Functions
| From: | Aidan Lister | Date: | Thu, 13 May 2004 11:03:09 +0000 |
| Subject: | Re: Common Functions | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-186083@lists.php.net to get a copy of this message | ||
This doesn't sound like a very secure method of doing things at all. Also,
managing a file that big sounds like quite a nightmare.
Have you looked at using OOP stuff?
Use a couple of standard pear classes like Auth, MDB2, and you're well on
your way to having a very maintainable site.
"Shaun" <shaunthornburgh@hotmail.com> wrote in message
news:20040513103355.77544.qmail@pb1.pair.com...
> Hi,
>
> I have designed my site such that all my common functions are stored in
one
> file which is included in all other files. So if ever someone presses a
> submit button or a link with a special $_GET variable that matches a
> variable in the common file the function is performed. e.g.
>
> //common.php
> if(isset($_POST[add_user])){
> //add user to db...
> }
>
> This makes the maintenance of the site very easy as all functions in one
> file, however this file has over 2500 lines of code. The site runs on a
> dedicated server and performance is not a problem, I would just be very
> interested to hear your opinions on this design structure and any problems
I
> may face with this design pattern.
>
> Thanks for your help