I'm building a PHP
site, but for now the only PHP
I'm using is a half-dozen or so includes on certain pages. (I will probably use some database queries eventually.)
Are simple include()
statements a concern for speed or scaling, as opposed to static HTML
? What kinds of things tend to cause a site to bog down?
The biggest thing you can do to speed up your application is to use an Opcode cache, like APC. There's an excellent list and description available on Wikipedia.
As far as simple includes are concerned, be careful not to include too many files on each request as the disk I/O can cause your application not to scale well. A few dozen includes should be fine, but it's generally a good idea to package your most commonly included files into a single script so you only have one include. The cost in memory of having a few classes here and there you don't need loaded will be better than the cost of disk I/O for including hundreds of smaller files.