 |
A PHP web page is treated just like a regular HTML page. It is made up of a standard text file which has code in it. You can create and edit them the same way. This article will show you how to create a very simple PHP web page.
Creating The PHP Page
A PHP page, just like an HTML page is simply a text file. You can create a PHP file from any text based editor like Windows Notepad. Lets go ahead and create our first PHP page. Start by open up your text editor and copy the following contents into it.
<html>
<head>
<title>PHP Test</title>
</head>
<body>
<?php echo '<p>Hello World</p>'; ?>
</body>
</html>
Now save the file as test.php
Uploading The PHP Page
As we said earlier a PHP page is the same as an HTML page, therefore use the same method to upload your PHP page as you would with an HTML page. Please note, you should upload this file to anywhere within your /public_html directory.
Testing PHP
Open your browser and navigate to the page which you just uploaded. It should be something like:
http://www.domain.com/test.php
Once loaded the page will display:
<html>
<head>
<title>PHP Test</title>
</head>
<body>
<p>Hello World</p>
</body>
</html>
|
 |