SitePoint Sponsor |
|
User Tag List
Results 1 to 2 of 2
-
Aug 11, 2007, 10:32 #1
- Join Date
- Mar 2006
- Posts
- 466
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Large PHP Functions Include - Performance
Hello,
As I've been working on my latest project, I've found that my file that holds all my functions (functions.php) has grown and grown and grown. Now the file is almost up to 60Kb even though I've optimized it the best that I know how to at this point.
My question is about performance.
There are times when I include my functions.php file just use my little db1_connection() function which simply does this:
PHP Code:mysql_connect(localhost, user, pass);
mysql_select_db(dbname) or die( "Unable to select database");
Brandon
-
Aug 11, 2007, 11:15 #2
- Join Date
- May 2007
- Location
- Poole, UK
- Posts
- 5,077
- Mentioned
- 103 Post(s)
- Tagged
- 0 Thread(s)
I don't know about performance wise but for finding functions, it may well pay to split it up, grouping the functions by the task they do, ie all database functions in a file of their own.
Bookmarks