A basic tutorial on building websites with PHP
|
Let's start at the very beginning1. Make a new folder for your website files, call it webfolder or whatever tickles your fancy. 2. In a new notepad document type:
<HTML>
<HEAD> <TITLE> This is my Page Title </TITLE> </HEAD> <BODY> 3. Save it as head.inc in the folder. Congratulations! You have now created your first template file. Let's make another... 1. In a new notepad document type:
</BODY>
</HTML> 2. Save it as footer.inc in your webfolder. Well done! You now have your footer template. Now for your index page... 1. In a new notepad document type:
<?php
include "head.inc"; ?> <P>Hello World</P> <?php include "footer.inc"; ?> 2. Save it as index.php in your webfolder. You now have the basic tools to create and maintain a complex website... I told you it was easy!Yeah, right, but how do I make it work? |