Jump to content

Trouble calling multiple pages into my php file


contemporaneous

Recommended Posts

So I've been trying to figure out where I'm going wrong with calling up separate html files into my php file.  I was following the instructions for this procedure over at http://www.apaddedcell.com/how-automatically-include-your-header-navigation-and-footer-every-page and as far as I can tell, I've followed it to the letter; even to the extent of pasting their code in directly.

 

This is my index.php code:

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Home page – My Website</title>
<meta http-equiv="description" content="page description" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<style type=”text/css”>@import “styles.css”;</style>
</head>

<html>
<body>

<?php include(“includes/header.html”);?>
<?php include(“includes/navigation.html”);?>

This is the content of the page

<?php include(“includes/footer.html”);?>

</body>
</html>

 

In my particular exercise, I have the header and navigation in one file called header.html.

 

This is the URL I'm testing it out on: http://dreamscapecreative.net/templates/index.php.  It's supposed to pretty much look like this (focusing on the header/nav and footer http://dreamscapecreative.net/

 

Thanks in advance to anyone who'd like to chime in and tell me where I'm going wrong.  It seemed pretty straightforward, from the tutorial.  Is it something painfully obvious?

 

 

Link to comment
Share on other sites

It seemed pretty straightforward, from the tutorial.  Is it something painfully obvious?

change this...

<?php include(“includes/header.html”);?>
<?php include(“includes/navigation.html”);?>

This is the content of the page

<?php include(“includes/footer.html”);?>

 

to this...

<?php include("includes/header.html");?>
<?php include("includes/navigation.html");?>

This is the content of the page

<?php include("includes/footer.html");?>

 

and this...

<style type=”text/css”>@import “styles.css”;</style>

to this...

<style type="text/css">@import "styles.css";</style>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.