Common Functions
| From: | Shaun | Date: | Thu, 13 May 2004 10:33:43 +0000 |
| Subject: | Common Functions | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-186082@lists.php.net to get a copy of this message | ||
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