Learn PHP:2-Check If PHP is Enabled On Your Server with This Script

Posted: September 29, 2010 in PHP
Tags:

Before you can work with PHP scripts and files, you must check to see if it is enabled on your server or local machine(computer). Use the “php_check.php” file code below to test and see whether or not your server can process PHP.

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 your browser, the output will tell you things.

php_check.php
Start Copy+Paste for this box here on this line of text

<html>
<title>PHP Check File</title>
<body>
<?php
print "<h1>Congratulations, your server can process PHP!</h1>";
print "<h3>Here you can view the PHP configuration on your server</h3>";
phpinfo( );
exit();
?>
<h1>Sorry, PHP is not enabled on this server.</h1><br /><br />
<h3>Check your host provider documentation or contact
your host provider to ask them how to enable PHP.</h3>
</body>
</html>

Advertisements
Comments
  1. car rims says:

    ghost ride that whip

  2. potenzmittel says:

    What is captcha code?, pls provide me captcha code codes or plugin, Thanks in advance.
    35

  3. Hi just thought i would tell you something.. This is twice now i?ve landed on your blog in the last 3 weeks looking for completely unrelated things. Great Info! Keep up the good work.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s