Structure of PHP files
| From: | HostWare Kft . ) | Date: | Thu, 23 Jul 2009 09:36:27 +0000 |
| Subject: | Structure of PHP files | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-295734@lists.php.net to get a copy of this message | ||
Hi,
It isn't really a programming question, but rather a structural.
Let's suppose I have a PHP page, which is built by other PHP files' includes.
Which is the better approach:
in a switch-like statement I include the required PHP files, which contain all the functions, and
the HTML code to provide the functionality, or
create a base PHP file which contains all the funcionality, and the PHP files only contain calls
for these functions, and the HTML code?
I think the previous method gives more control and it is more repairable, but the later method gives
more modularity. With your experiences, what method gives the better overall usability?
Thanks,
SanTa