Now that you have installed all the required software (or your using a web host), we need to test your environment to see if it can actually run PHP code. We do this by creating a test file, add some code and navigate to that file via a web browser.
First thing we have to do is create a file named index.php. Once that is done add the following code:
<?php phpinfo(); ?>
NOTE: Using the phpinfo() function will output a bunch of information about your PHP environment. Since it contains potentially important information, it is wise not to allow outside users to see it.
Save the file and move it to your web server's root directory.Once you have made the move open up your favorite web browser (Firefox, Safari, IE) and navigate to:
http://www.example.com/index.php (if your using a web hosting company)
or
http://localhost/index.php (if your working on your own computer)
If everything went correctly, you should see something like the image below.

Comments
Post new comment