ANIME WORKSHOP : Anime, Manga, Japan!
« PHP Includes »

Welcome Guest. Please Login or Register.
Dec 29, 2009, 8:33am




ANIME WORKSHOP : Anime, Manga, Japan! :: Tutorials :: Misc. Tutorials :: PHP Includes
   [Search This Thread][Send Topic To Friend] [Print]
 AuthorTopic: PHP Includes (Read 36 times)
DarkMoon
Administrator
*****
member is offline

[avatar]

If you love something, set it free, if it comes back, it was ment to be

[yim] [msn] [aim]
[homepage]

Joined: Feb 2004
Gender: Female
Posts: 2,451
Location: Florida
Karma: 49
 PHP Includes
« Thread Started on Jun 30, 2005, 12:23am »

Okay here is an easy and short tutorial on how to use PHP includes for your website.

1. Copy and paste the top half of your site into notepad and save it as HEADERS, basically everything from the beginning to the start of your content for that page.

2. Copy and paste the bottom half of your site into notepad and save it as FOOTERS, basically everything from the end of the content for that page to the bottom.

3. Now that the top of your html for that page is deleted, you must put this code on the top...

<?php include('header.txt'); ?>

4. And you put this in the bottom...

<?php include('footer.txt'); ?>

5. After that make sure to save the page as PAGENAME.php

6. Also make sure that when you are saving, where it says SAVE AS TYPE, that you put ALL FILES, so it will save as a php file and txt.

And then you're done! Remember to save all of you all your file extensions to PHP and links.

EDIT// you can actually also save your index as php too, so do everything the same for ALL pages. And you can save the Header and Footer in php, just remember to change the ending in the code above!


Wonder what the use for this is?

It's to call certain files to certain places on a website. With this method, its being used to easily change the header and footer from one single file, rather then multiple files and messing things up.
« Last Edit: Jul 5, 2009, 10:46pm by DarkMoon »Link to Post - Back to Top  IP: Logged

I'm just an urban girl, where Roxy means everything!
evildunkingrl
Legendary Member
*****
member is offline

[avatar]

I'm none other than evil-sama

[yim] [msn] [aim]
[homepage]

Joined: Mar 2005
Gender: Female
Posts: 4,837
Location: Ask me
Karma: 53
 Re: Convert to PHP
« Reply #1 on Mar 24, 2006, 10:02pm »

im gonna borrow this for my site
Link to Post - Back to Top  IP: Logged

http://evildunkingrl87.deviantart.com
http://qualityoflife.proboards75.com
DarkMoon
Administrator
*****
member is offline

[avatar]

If you love something, set it free, if it comes back, it was ment to be

[yim] [msn] [aim]
[homepage]

Joined: Feb 2004
Gender: Female
Posts: 2,451
Location: Florida
Karma: 49
 Re: Convert to PHP
« Reply #2 on May 31, 2006, 11:10pm »

That's cool...its the easiest thing you can know and helps a lot!
Link to Post - Back to Top  IP: Logged

I'm just an urban girl, where Roxy means everything!
wolf9
Guest
 Re: PHP Includes
« Reply #3 on Jun 12, 2009, 9:12pm »

I even love the fact that you are a smart web designer...I accept you for you
Link to Post - Back to Top  IP: Logged
DarkMoon
Administrator
*****
member is offline

[avatar]

If you love something, set it free, if it comes back, it was ment to be

[yim] [msn] [aim]
[homepage]

Joined: Feb 2004
Gender: Female
Posts: 2,451
Location: Florida
Karma: 49
 Re: PHP Includes
« Reply #4 on Jul 5, 2009, 10:43pm »


Jun 12, 2009, 9:12pm, wolf9 wrote:
I even love the fact that you are a smart web designer...I accept you for you


ok
Link to Post - Back to Top  IP: Logged

I'm just an urban girl, where Roxy means everything!
wolf9
Guest
 Re: PHP Includes
« Reply #5 on Jul 9, 2009, 6:00pm »

caio my account is now terminated
Link to Post - Back to Top  IP: Logged
   [Search This Thread][Send Topic To Friend] [Print]

Click Here To Make This Board Ad-Free


This Board Hosted For FREE By ProBoards
Get Your Own Free Message Boards & Free Forums!