Before an author can work with PHP scripts and files, they must check to see if it is enabled on their online server or local machine. Use the php_check.php file below to test whether or not a server or machine is ready. If PHP is enabled, the phpinfo( ) function will list the server configuration details.
1. Create a new blank file in your favorite text editor.
2. Place the code below into the new file and save it as “php_check.php”.
3. Put it on your server, and view it with browser software.
"<h1>Congratulations, your server can process PHP!</h1>";echo
echo "<h3>Here you can view the PHP configuration on your server</h3>";
<h1>Sorry, PHP is not enabled on this server.</h1>
<h3>Check your host provider documentation or contact your host provider to ask them how to enable PHP.</h3>