Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: PHP: Includes Tutorial

  1. #1
    pulse__xx's Avatar
    pulse__xx is offline x10 Sophmore
    Join Date
    Aug 2005
    Posts
    175

    Post PHP: Includes Tutorial

    PHP includes are an important part of PHP. With HTML sometimes it gets very annoying having to change everything if for example you change your layout, it can be very time consuming ! PHP includes break down this process so that can have a header.php file and a footer.php file and these will appear on every main page, so if you were to change your layout you would only have to change these two files !

    1. Here is an example of the HTML page, it is a very simple page to make it easier for you to understand. Basically this coding would be on every individual page but the only bit that would change would be where the content is. So you see how inefficient this is?

    <head>
    <title>Your page title</title>
    <link rel="stylesheet" type="text/css" href="style.css">
    </head>

    <body>
    <div id="content">Main content here</div>

    <div id="footer">Copyright</div>
    </body>

    2. Take the top part of your coding that is always the same with each page

    <head>
    <title>Your page title</title>
    <link rel="stylesheet" type="text/css" href="style.css">
    </head>

    Now paste this into notepad and save it as header.php

    3. Take the bottom part of the coding that is the same with each page.

    <div id="footer">Copyright</div>
    </body>

    Now paste this into notepad and save it as footer.php

    4. Now you will be left with the middle part... this should change with each page as this is the actual content. So now we can join this together

    <?PHP include ("header.php"); ?>

    <body>
    <div id="content">Main content here</div>

    <?PHP include ("footer.php"); ?>

    Now you could name this file content.php, or whatever, but make sure it ends in .php ! and for another page for example tutorials.php you could use the same coding, eg

    <?PHP include ("header.php"); ?>

    <body>
    <div id="content"><b>Tutorials</b>
    <br>
    List of tutorials here
    </div>

    <?PHP include ("footer.php"); ?>

    The header and footer will be the same, just the content will change, so then if you decide to change your layout, you will only need to edit header.php and footer.php!

    Sysque Studios for more tutorials.

    This tutorial is brought to you by http://so-you.net/
    Last edited by pulse__xx; 11-11-2005 at 04:06 PM. Reason: Copyright link not added.

  2. #2
    Bryon is offline Administrator
    Join Date
    Apr 2005
    Posts
    7,721

    Re: PHP: Includes Tutorial

    Your infringing on "Char's" copyrights.

    Unless you own that site too, or submitted it to them...

    Learn how to give people their credit.
    Last edited by Bryon; 11-11-2005 at 03:05 PM.

  3. #3
    pulse__xx's Avatar
    pulse__xx is offline x10 Sophmore
    Join Date
    Aug 2005
    Posts
    175

    Post Re: PHP: Includes Tutorial

    She actually has stolen tutorials from me in the past, this tutorial is not hers and Char has stolen random tutorials from codejunction.com and sekka.co.uk.

  4. #4
    Bryon is offline Administrator
    Join Date
    Apr 2005
    Posts
    7,721

    Re: PHP: Includes Tutorial

    Hmm. Well still, can you prove that?

    Who cares if they stole them, that doesn't give you the right to take credit for them, and say they are yours.

    All the tutorials you have just posted in the last little while have been taken off of other sites. It's pretty pathetic.
    Last edited by Bryon; 11-11-2005 at 03:11 PM.

  5. #5
    Jake's Avatar
    Jake is offline Developer
    Join Date
    Apr 2005
    Location
    Winona, MN
    Posts
    2,092

    Re: PHP: Includes Tutorial

    you know whats always good? using a tutorial to write a better tutorial ;)
    Jake Omann | Developer
    █ 888-X10-9668 - jake[@]x10hosting.com
    x10Hosting - Giving Away Hosting Since 2004
    Premium Hosting | VPS Services

  6. #6
    pulse__xx's Avatar
    pulse__xx is offline x10 Sophmore
    Join Date
    Aug 2005
    Posts
    175

    Arrow Re: PHP: Includes Tutorial

    Yes, actually she was copying and pasting tutorials from my beta website 3 days ago.

    Using my log script, I have found her IP Address.

    Logged 10/7/2005::|||||||||=====__3:45 P.M.@**!
    User from ip ||65.43.22.191|| viewing //('tutorial')// section.
    User from ip ||65.43.22.191|| viewing //('tutorial')// section.
    User from ip ||65.43.22.191|| viewing //('tutorial')// section.
    User from ip ||65.43.22.191|| copying code //('tutorial')// section.
    User from ip ||65.43.22.191|| copying code //('tutorial')// section.
    User from ip ||65.43.22.191|| copying code //('tutorial')// section.
    User from ip ||65.43.22.191|| copying code //('tutorial')// section.
    User from ip ||21.72.110.63|| viewing //('tutorial')// section.
    User from ip ||21.72.110.63|| viewing //('tutorial')// section.
    User from ip ||21.72.110.63|| left //('tutorial')// section.
    User from ip ||21.72.110.63|| left //('tutorial')// section.
    User from ip ||65.43.22.191|| left //('tutorial')// section.
    ==
    Logged.

  7. #7
    Bryon is offline Administrator
    Join Date
    Apr 2005
    Posts
    7,721

    Re: PHP: Includes Tutorial

    How could a PHP logging script "know" when a tutorial is being "copied and pasted"? I think you just made that up. (You did by the way)

    Bull ****. She did not steal the tutorials from you on 10/7. I have solid proof of this also.

    Stop lieing, or I myself will just delete these threads and warn you, even if it's not my place to do so.

    *scowls*
    Last edited by Bryon; 11-11-2005 at 03:37 PM.

  8. #8
    Nate_Benton's Avatar
    Nate_Benton is offline x10 Lieutenant
    Join Date
    Aug 2005
    Location
    Plainwell, Michigan, USA.
    Posts
    285

    Re: PHP: Includes Tutorial

    Alright guys, this needs to stop.
    Take it off the forums.

  9. #9
    Mani5 is offline x10 Lieutenant
    Join Date
    Sep 2005
    Posts
    473

    Re: PHP: Includes Tutorial

    yo! dude chill take some rest and please stop posting these tutorial in x10..I go an idea why dont u make a forum put all these tut there and give us da link to that site...

    thats what I sya and well NedreN is quite right..



    ---------------------------------------------------------------------
    Advertising

    Spectre Productionz

    Symbionic

    Want your site here? PM me and 5 points a week.

  10. #10
    rahul2006 is offline x10 Sophmore
    Join Date
    Oct 2005
    Location
    IN THE HELL , WANT TO JOIN THEN PM ME
    Posts
    214

    Re: PHP: Includes Tutorial

    ya best idea

Page 1 of 2 12 LastLast

Similar Threads

  1. [PHP] MySQL and PHP
    By Bryon in forum Tutorials
    Replies: 45
    Last Post: 02-09-2013, 09:45 PM
  2. [PHP] Variables in PHP
    By Bryon in forum Tutorials
    Replies: 15
    Last Post: 01-29-2009, 09:46 AM
  3. Unstand PHP?
    By o0slowpaul0o in forum Tutorials
    Replies: 8
    Last Post: 01-07-2008, 09:16 PM
  4. Rewritten PHP Includes tutorial
    By [XiRE] in forum Tutorials
    Replies: 2
    Last Post: 07-28-2006, 10:19 AM
  5. [PHP] Dynamic Includes Tutorial
    By Bryon in forum Tutorials
    Replies: 3
    Last Post: 12-16-2005, 01:34 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
dedicated servers