Jump to content

trying to get includes to work


dotolee

Recommended Posts

Hi there.

i've created a simple test page that only has the following;

<? include 'header.inc'; ?>

<p> This is a default site template.</p>

<? include 'footer.inc'; ?>

 

This file has been named as simple.php.

when I navigate to it, the stuff in the main page shows, but the header is ignored.

can you tell me where I'm going wrong?

thanks.

Link to comment
https://forums.phpfreaks.com/topic/104559-trying-to-get-includes-to-work/
Share on other sites

Contents of the include: (just HTML)

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"

"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >

<head>

<title>test</title>

<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1" />

</head>

<BODY bgcolor="#FFFFFF" text="#404040" link="#0000FF" vlink="#990099" MARGINWIDTH="1" MARGINHEIGHT="1" TOPMARGIN="1" LEFTMARGIN="1" RIGHTMARGIN="1">

 

<link type="text/css" href="style/menu.css" rel="stylesheet">

<table border="0" cellpadding="0" cellspacing="0" width="100%">

<tr>

<td><img src="images/logo.jpg" width="400" height="200" align="left"></td>

<!--<td> </td>-->

<td COLSPAN="2"> </td>

</tr>

<tr bgcolor="#738EAD" height="2%">

<!--#336699; 006699 -->

 

<td colspan="3" valign="middle" align="right" valign="center">

<div class="toc"><font color="#E0E0E0">

<A HREF="For_ResearchersStudents.php"><font color="#FFFFFF">For Researchers & Students</font></A> | 

<A HREF="aboutus.php"><font color="#FFFFFF">About Us</font></A> | 

</div>

</td>

</tr>

<tr><td colspan="2" align="center"> </td></tr>

</table>

 

 

<!-- style sheets -->

<link href="css/gencontent.css" rel="stylesheet" type="text/css" />

<link href="css/layoutmap.css" rel="stylesheet" type="text/css" />

<link href="css/menu.css" rel="stylesheet" type="text/css" />

 

 

The includes are in the same folder and the calling page.

thx

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.