When you install PHP for the first time one of the best ways of knowing it is configured correctly is to use a simple PHP script. If your browser can read the file and carry out the stated action then you know you are ready to continue with more interesting things.
So without further ado here are a couple of simple PHP scripts that will get you started.
<html>
<head>
<title> Supporting Tech PHP Test Script </title>
</head>
<body>
<?php
phpinfo( );?></body>
</html>
This script will display some of the hosts php specifications. Alternatively, if you want to 'keep it real' then you can always use the classic 'Hello World' script.
<html>
<head>
<title> Supporting Tech PHP Test Script</title>
</head>
<body>
<?php
Echo "Hello world";
?></body>
</html>
UPLOADING AND TESTING
1. Type the above and save the file as 'index.php'.
2. Add this to your web server root directory.
3. Open up your web browser and type in the address to view that page .e.g 'localhost' if you're using IIS.
No comments:
Post a Comment