I am working on a huge site and need to include several file in some page (classes, function, header, footer, etc...).
So I have 2 questions:
1- Is there a limit number of include files?
2- Is is better to include alot of small file (ex... one class per page) or one big file (with all classes) if sometime I may only need 1 class.
1. No practical limit unless you feel like including a gazillion files
2. Smaller files.
I commonly have lots of files that are 'grouped' according to what classes I'd need often. (I have no idea if that makes sense to you)
About many smaller files: If you don't use a php accelerator you'll suffer a big performance hit. And depending on your files structure layout you might have to write quite a few of "require_once".
I just put a single class in a file, and, in one file, require all of the class files.
Then just require that file.
I read somewhere about a performance benchmark regarding functions,
Where the author wanted to see if having a bunch of functions that never get called affected performance - and he found out having thousands of functions but not ever calling 'em made very little performance difference.
So going off that I would think that a single large file with alot of classes is more beneficial, but I've never seen any data regarding that.
If you're primarily using object oriented programming, consider registering an autoload function to prevent you from having to include files that you don't need.