ButtermilkJack
New Member
I've been given a site to maintain and after looking through the code it all looks very strange to me. Just wondering if anyone could enlighten me as to the pros of using code like this. I've never seen a site built this way before?
First of all, every page on the site is made up of a basic php template file using only includes. For example...
First of all, every page on the site is made up of a basic php template file using only includes. For example...
So, every page has 2 files. One is the php template, and the other is the php content (or include). I've seen this type of set-up before, but the includes are quite strange themselves (to me anyway) in that each line of code is preceeded with '$TEXT .='. Why would simple html be coded in this way if that's all they want to 'include'?<?
ob_start();
?>
%%HEADER%%
<table border=0 align=center cellpadding=5 width=100% cellspacing=0>
<tr>
<td height=35 class='body'>Office Furniture</td>
</tr>
<tr>
<td class='ref'>%%OFFICEFURNITURE%%</td>
</tr>
</table>
%%FOOTER%%
<?
$template = ob_get_contents();
ob_end_clean();
include "includes/Header.inc.php";
include "includes/OfficeFurniture.inc.php";
include "includes/Menu.inc.php";
include "includes/Footer.inc.php";
echo $template;
?>
<?
$TEXT = "";
$TEXT .= "<table border=0 cellpadding=2 width=100% cellspacing=0>\n";
$TEXT .= " <tr>\n";
$TEXT .= " <td valign=top width=35%>\n";
...