Site Logo  

Welcome to the
Build It Yourself Website .com

 
Under Construction
Note: This site is currently under construction.
 
 
Menu



Get your free Build It Yourself Website .com Template.

Right click and choose "Save Target As..."

Right Click - Save Target As...




Additional Information









 

Index.php Code Part 1

Congratulations! You have now gotten everything ready to put together in your webpage. Now when you can see how all the parts and pieces fit together to create a real webpage. Not only that, you will understand what these parts and pieces are doing when they are all put together.

Because there is so much information about this most important web page, it will take us several pages to explain it all. You don't have to make many, if any, changes to the code. It is just to explain what each line does so you will know why it is there to make changes if you want.

Ok, let's get going. Go ahead and open up HomeSite. Open up the file in your website folder called "index.php". Notice the file name ends only in ".php", not ".inc.php". This is because it is a fully fledged web page, not an included file. The file is named "index.php" because web browsers automatically know to open up an "index" page as the home page of the web site.

All websites need to have an index page. Once this page is set up the way you want it, you can make a copy, rename it, change the content, and presto, you have another page for your website.

Let's not jump to far ahead. We need to start by first looking at the code of the index page then we will go over it section by section and line by line so that you can better understand it.

At first glance it may look like a lot of code, however, it is actually not as bad as you might think. Let's look at each section and see exactly what it does.

<html>

The first line "<html>" is a very important command. This command tells the computer that everything between the "<html>" and "</html>" commands is the HTML Language. With these commands the computer should translate everything accordingly. You may have noticed with the previous files that when you hit the browse tab at the top of HomeSite that you couldn't see anything but the code you just typed. This is because the includes files will be included into this page that has the html and will know to translate the code at that time. Keep in mind that php will only work once it is uploaded to a web server that supports it, so you still won't be able to see them with HomeSite. However, you will be able to see the contents of the base pages you are working on.

    



 
 

Google



Additional Links    •    Search    •    Contact Us    •    Site Map



Any problems with this site, please feel free to contact the webmaster.

 



By viewing this site, you agree to the
Terms of Use Policy.

Copyright © 2002-2010 Build It Yourself Website .com