-
Step 1
Open a simple text editor like Wordpad or Notepad. Microsoft Word and higher level word processors add a lot of unwanted formats that can interfere with the code.
-
Step 2
Type in the code that you want the second file to call. Here is an example:
<html>
<body>
<a href=http://www.thisisatest.com/index.php>Home</a> -
<a href=http://www.thisisatest.com/about.php>About</a> -
<a href=http://www.thisisatest.com/php.php>PHP coding</a><br/> -
Step 3
Save the file as a PHP file. We will call it "Test.php."
-
Step 1
Open a simple text editor like Wordpad or Notepad if you closed it in the first section of this article.
-
Step 2
Type in the following code to call "Test.php:"
<?php include ("test.php");?>
<p> Welcome to my homepage. Select an option from the above links.</p>
</body>
</html> -
Step 3
Save the file as "index.php." When a website is opened it defaults to the index file. Now when someone accesses your website they will see the following:
Home -- About -- PHP coding
Welcome to my homepage. Select an option from the above links.













