194673
12-29-2006, 06:18 AM
Hmmm. I can't figure out why, but I get this error:
Fatal error: Call to undefined function: generate_header() in /*directory*/index2.php on line 10
When I run this script (index2.php):
<?php
include (head.php);
generate_header();
?>
head.php
<?php
function generate_header() {
echo ('<center>
<table style="border:none; width:768" border="0">
<tr>
<td colspan="3"><a href="index.php"><img src="images/banner.jpg" alt="Home" border="0" /></a></td>
</tr>
<tr style="height:50;">
<!--<td height="50"><a href="index.php"><img src="images/nav_icon.jpg" alt="Home" border="0" align="top" /></a></td>
<td style="width:709; background-image:url(images/nav_bg.JPG); height:50;"></td>
<td><img src="images/nav_right.jpg" border="0" align="top" /> </tr> -->
<td style="height:50; width:768;"><img src="images/nav_whole.jpg" border="0" usemap="#Nav" /></td>
<map name="Nav" id="Nav"><area shape="rect" coords="150,3,206,24" href="index.php" target="" />
<area shape="rect" coords="220,3,385,24" href="#" />
<area shape="rect" coords="399,3,484,24" href="#" />
<area shape="rect" coords="498,3,571,24" href="#" />
<area shape="rect" coords="588,3,666,24" href="#" />
<area shape="rect" coords="72,26,322,46" href="#" /><area shape="rect" coords="342,26,399,46" href="#" />
<area shape="rect" coords="419,26,494,46" href="#" /><area shape="rect" coords="513,26,594,46" href="#" /><area shape="rect" coords="613,26,751,46" href="#" />
<area shape="rect" coords="1,0,50,50" href="index.php" />
</map>
</table>
</center>');
}
?>
Fatal error: Call to undefined function: generate_header() in /*directory*/index2.php on line 10
When I run this script (index2.php):
<?php
include (head.php);
generate_header();
?>
head.php
<?php
function generate_header() {
echo ('<center>
<table style="border:none; width:768" border="0">
<tr>
<td colspan="3"><a href="index.php"><img src="images/banner.jpg" alt="Home" border="0" /></a></td>
</tr>
<tr style="height:50;">
<!--<td height="50"><a href="index.php"><img src="images/nav_icon.jpg" alt="Home" border="0" align="top" /></a></td>
<td style="width:709; background-image:url(images/nav_bg.JPG); height:50;"></td>
<td><img src="images/nav_right.jpg" border="0" align="top" /> </tr> -->
<td style="height:50; width:768;"><img src="images/nav_whole.jpg" border="0" usemap="#Nav" /></td>
<map name="Nav" id="Nav"><area shape="rect" coords="150,3,206,24" href="index.php" target="" />
<area shape="rect" coords="220,3,385,24" href="#" />
<area shape="rect" coords="399,3,484,24" href="#" />
<area shape="rect" coords="498,3,571,24" href="#" />
<area shape="rect" coords="588,3,666,24" href="#" />
<area shape="rect" coords="72,26,322,46" href="#" /><area shape="rect" coords="342,26,399,46" href="#" />
<area shape="rect" coords="419,26,494,46" href="#" /><area shape="rect" coords="513,26,594,46" href="#" /><area shape="rect" coords="613,26,751,46" href="#" />
<area shape="rect" coords="1,0,50,50" href="index.php" />
</map>
</table>
</center>');
}
?>