Results 1 to 4 of 4
Hybrid View
-
14th Jan 2011, 03:33 PM #1OPRespected Member
PHP Include (How To Template Your Site)
These are awesome for making headers/footers/same thing on many pages. It will save you from having to change the same thing on many pages. Rather then doing that, with a few characters of code ( <?php include 'footer.php'; ?> ) you will only need to modify one document to change whatever it is on every page.
Lets assume this is your site and you need to modify the footer. You have over 300 pages. That would be a pain in the ass.
Code:<html> <head> <title>My Site</title> </head> <body> <center>My Site Sections here: Awesome Section 1/Super cool stuff/Even better things</center> <br><br> This is such a super cool site that you want to copy it. Look how much info is here in my main section <br> <br> Copyright 2011 My super cool site<br> </body> </html>
First thing you need to do is make a header.php file. All the info from your header is included in that file.
Code:<html> <head> <title>My Site</title> </head> <body> <center>My Site Sections here: Awesome Section 1/Super cool stuff/Even better things</center> <br><br>
Code:<br> <br> Copyright 2011 My super cool site<br> </body> </html>
make an index.php file and call up the files you just made. You will see using this will save you a ton of time if you have many pages.
Code:<?php include 'header.php'; ?> This is such a super cool site that you want to copy it. Look how much info is here in my main section <?php include 'footer.php'; ?>
Jesse Reviewed by Jesse on . PHP Include (How To Template Your Site) These are awesome for making headers/footers/same thing on many pages. It will save you from having to change the same thing on many pages. Rather then doing that, with a few characters of code ( <?php include 'footer.php'; ?> ) you will only need to modify one document to change whatever it is on every page. Lets assume this is your site and you need to modify the footer. You have over 300 pages. That would be a pain in the ass. <html> <head> <title>My Site</title> </head> Rating: 5
-
14th Jan 2011, 03:38 PM #2MemberWebsite's:
Tastro.org HDTVXviDLOL.com EpisodeSeasons.com FileBorg.org W-47.comye goog job... you just should have a variable on each page, which tells php how the title of the page should look like... else the title on all pages will be the same... and that's not good for SEO.
LE with your pr2 site? <a href="http://tastro.org/">Tastro.org</a> or link exchance with our category page: <a href="http://tastro.org/i/hdtv">HDTV</a> | <a href="http://tastro.org/i/dvdrip">DVDRip</a> | <a href="http://tastro.org/i/r5">R5</a> | <a href="http://tastro.org/i/bdrip">BDRip</a> | <a href="http://tastro.org/i/brrip">BRRip</a>
-
14th Jan 2011, 03:43 PM #3OPRespected Member
Yup. Or you can start the header template below the <title></title>. You'd just need to change what's included in the header.php
<html>
<head>
<title>My Site</title>
</head>
<?php include 'header.php'; ?>
This is such a super cool site that you want to copy it. Look how much info is here in my main section
<?php include 'footer.php'; ?>
-
14th Jan 2011, 03:38 PM #4Member
thank you very much!
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
[Selling] Post Button (Include PSD)
By Samar in forum ServicesReplies: 0Last Post: 26th Aug 2012, 06:08 PM -
Use php include for certain div of the page
By igordr in forum Web Development AreaReplies: 9Last Post: 25th Aug 2012, 05:54 PM -
[Selling] 4 Website for Sale (include 2 PR2 + 1 PR1)
By freehealthylife.com in forum Completed TransactionsReplies: 5Last Post: 28th Sep 2011, 11:05 AM -
vbulletin 4 php include
By Klinzter in forum Webmaster DiscussionReplies: 0Last Post: 31st Aug 2011, 09:13 PM -
[TUT]Achieving a PHP Include in a template bit
By Lease in forum IP.BoardReplies: 0Last Post: 13th Jan 2008, 01:32 AM
themaCreator - create posts from...
Version 3.24 released. Open older version (or...