adamsgi
19th September 2009, 10:55
I have a website that is a php template, but is effectively a group of HTML files held together with a few php includes. What the site does is looks for the page name in an array and if the page name exists it allows the choice of page (and menu), if not, it displays the home page. The code is like this:
<table cellpadding="0" cellspacing="0" width="760" align="center">
<tr>
<td height="175" colspan="2">
<?php
include("header.php");
?></td>
</tr>
<tr>
<td width="167" align="left" valign="top">
<?php
$menus=array('menu1','menu2','menu3','menu4');
if(in_array($menu, $menus)) {
include("$menu.php"); }
else {
include("menu1.php");
}
?></td>
<td width="593" align="left" valign="top">
<?php
$pages=array('about','accbur','assist','bprices',' case1','case2','case3','case4','contact','cvs','do wnloads','esr','fmprices','gp','hrabout','internat ional','international_d','international_fr','inter national_es','international_it','international_pt' ,'international_nl','irish','main','manage','manx' ,'nofrills','outsource','quote1','recruitag','serv ices','starter','temp','thanks','links');
if(in_array($page, $pages)) {
include("$page.php");
} else {
include("main.php");
}
?></td>
</tr>
<tr>
<td height="53" colspan="2">
<?php
include("footer.php");
?></td>
</tr>
</table>
It has worked for 2 years but suddenly this month it has stopped working. Our hosts are using PHP 5.2.8 (it was PHP 4 when we originally put the website up) and I don't know what is wrong. Is there anyone out there that has come across this problem before?
<table cellpadding="0" cellspacing="0" width="760" align="center">
<tr>
<td height="175" colspan="2">
<?php
include("header.php");
?></td>
</tr>
<tr>
<td width="167" align="left" valign="top">
<?php
$menus=array('menu1','menu2','menu3','menu4');
if(in_array($menu, $menus)) {
include("$menu.php"); }
else {
include("menu1.php");
}
?></td>
<td width="593" align="left" valign="top">
<?php
$pages=array('about','accbur','assist','bprices',' case1','case2','case3','case4','contact','cvs','do wnloads','esr','fmprices','gp','hrabout','internat ional','international_d','international_fr','inter national_es','international_it','international_pt' ,'international_nl','irish','main','manage','manx' ,'nofrills','outsource','quote1','recruitag','serv ices','starter','temp','thanks','links');
if(in_array($page, $pages)) {
include("$page.php");
} else {
include("main.php");
}
?></td>
</tr>
<tr>
<td height="53" colspan="2">
<?php
include("footer.php");
?></td>
</tr>
</table>
It has worked for 2 years but suddenly this month it has stopped working. Our hosts are using PHP 5.2.8 (it was PHP 4 when we originally put the website up) and I don't know what is wrong. Is there anyone out there that has come across this problem before?