Jump to content

[SOLVED] Need help so i dont create 1000 pages


kchung

Recommended Posts

Yo need help on something. I have an HTML template i downloaded. Want to use it on my website. Dont want to edit every single page every time i change 1 tiny thing. Someone on a different, not very active forum, said something about

<?php

include 'header.php';

?>

 

and how i could use that. I tried to put it into my code but it didnt do anything. Anyone got and ideas or can help me in another way that would be great. Also if you have AIM or MSN that i can talk to u alot faster, would be a great help

Link to comment
Share on other sites

i have PHP version 5.2.1 installed on my server i bought. I dont really have 1000 pages, i just dont want to create lots of pages and have to edit every single one when i update like a banner or part of the menu or something.

 

 

BTW i did make the file header.php and i put it in the same directory as index.php.

 

The lines that are in the file header.php are all of the lines in between <head> and </head> without including <head> and </head>

Link to comment
Share on other sites

Basically it will work like this:

 

header.php

<img src="banner.jpg" />

 

index.php

<html>
<head>
</head>
<body>
<?php
include('header.php');
?>
</body>
</html>

 

Its pretty easy and straightforward. Go learn some php by the way as ull need it :)

 

i would rather do it this way

<?php
//php script here statement here

require  'header_template.php';
require  'body_template.php';
require  'footer_template.php'; 
?>

 

that will somehow help you to avoid the header error thing

Link to comment
Share on other sites

OK this is what i am trying to do. This is my the original code, the top part atleast

 

BTW i use frontpage 2003

 

 

<!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-AU">
  
<head>
<meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8" />
  <meta name="author" content="pat" />
  <meta name="keywords" content="fullahead, more, keywords, here" />
  <meta name="description" content="OWD uneven v1.0 template - four colour themes available" />
  <title>uneven v1.0</title>

  <link rel="stylesheet" type="text/css" href="css/uneven_relaxed.css" media="screen, tv, projection" />
  <link rel="stylesheet" type="text/css" href="css/uneven_relaxed_print.css" media="print" />
</head>

 

i want to change it so its like this

 

<!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-AU">
  
<head>
<?php
//php script here statement here

require  'header.php';
?>
</head>

 

or something similar so i can use it as a template to create multiple pages and not have to update every single page i make a change on the main page

 

The header.html should look like this correct?

 

	<meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8" />
  <meta name="author" content="pat" />
  <meta name="keywords" content="fullahead, more, keywords, here" />
  <meta name="description" content="OWD uneven v1.0 template - four colour themes available" />
  <title>uneven v1.0</title>

  <link rel="stylesheet" type="text/css" href="css/uneven_relaxed.css" media="screen, tv, projection" />
  <link rel="stylesheet" type="text/css" href="css/uneven_relaxed_print.css" media="print" /> 

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.