Mark,

I use one functions file per site, then I know that if I include it, and all
of my functions are available.

George

> -----Original Message-----
> From: Mark Kelly [mailto:[EMAIL PROTECTED]
> Sent: 26 May 2006 9:02 am
> To: php-general@lists.php.net
> Subject: [PHP] Including Functions; one file or many?
>
>
> Hi
>
> I'm writing a set of db abstraction functions for an internal app
> which will
> give us a set of simple function calls for dealing with the db, like
>
> $result = db_AddEmployee($EmployeeData);
> $EmployeeData = db_GetEmployee($EmployeeID);
>
> etc.
>
> There will be quite a few functions needed to deal with all the different
> ways the app touches the db, so my question is:
>
> Am I better off putting all these functions into one big include
> file (which
> could get pretty big) or using a seperate 'include' file for each
> function?
>
> I'm thinking about the tradeoff between simplifying code by only having a
> single include file (parsing a lot of functions that aren't used,
> but less
> disk access) and having several include files (no extra funcs but
> lots more
> disk access).
>
> I realise there probably isn't a 'correct' way to do this, I'm
> curious about
> which methods folk here use in situations like this.
>
> TIA in advance for any advice,
>
> Mark
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to