kchung Posted September 21, 2007 Share Posted September 21, 2007 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 Quote Link to comment https://forums.phpfreaks.com/topic/70082-solved-need-help-so-i-dont-create-1000-pages/ Share on other sites More sharing options...
cooldude832 Posted September 21, 2007 Share Posted September 21, 2007 well first you need php enabled on your server, if it not pasting that in a page will simply return nothing. Secondly how do you have 1000 pagse of unqiuly developed content that are not developed off a database? Third you need to have the file header.php made. Quote Link to comment https://forums.phpfreaks.com/topic/70082-solved-need-help-so-i-dont-create-1000-pages/#findComment-351975 Share on other sites More sharing options...
kchung Posted September 21, 2007 Author Share Posted September 21, 2007 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> Quote Link to comment https://forums.phpfreaks.com/topic/70082-solved-need-help-so-i-dont-create-1000-pages/#findComment-351977 Share on other sites More sharing options...
Fadion Posted September 21, 2007 Share Posted September 21, 2007 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 Quote Link to comment https://forums.phpfreaks.com/topic/70082-solved-need-help-so-i-dont-create-1000-pages/#findComment-352064 Share on other sites More sharing options...
teng84 Posted September 21, 2007 Share Posted September 21, 2007 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 Quote Link to comment https://forums.phpfreaks.com/topic/70082-solved-need-help-so-i-dont-create-1000-pages/#findComment-352078 Share on other sites More sharing options...
kchung Posted September 21, 2007 Author Share Posted September 21, 2007 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" /> Quote Link to comment https://forums.phpfreaks.com/topic/70082-solved-need-help-so-i-dont-create-1000-pages/#findComment-352625 Share on other sites More sharing options...
kchung Posted September 21, 2007 Author Share Posted September 21, 2007 Cool Dude my msn is kchung004@hotmail.com wont let me reply to your pm Quote Link to comment https://forums.phpfreaks.com/topic/70082-solved-need-help-so-i-dont-create-1000-pages/#findComment-352664 Share on other sites More sharing options...
kchung Posted September 22, 2007 Author Share Posted September 22, 2007 Taïth Nanethcan solved my problem via MSN kinda stupid of me but i am a nub. My problem was the file was index.html and not index.php =D thanks Taith Quote Link to comment https://forums.phpfreaks.com/topic/70082-solved-need-help-so-i-dont-create-1000-pages/#findComment-352705 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.