- Create a file called phpinfo.php
- Enter these few lines of code in it: (you can copy-paste from below):
<?php
phpinfo();
?> - Upload this to your root folder (where your home page (index.htm or index.html etc) lives.
- Access this script via the browser like this:
http://www.YourSite.com/phpinfo.php - You should see a nice page come up, with the PHP logo and headers, that shows all of your PHP configuration and settings. If you see it, then: Hurrah, you can run PHP on your site!
- If you see some kind of errors, first try changing the file’s permissions (chmod) to 755. (CHMOD Tutorial)
- If that still doesn’t work, then you’re probably SOL (S#!t Outta Luck). Confirm it with your web host.
- If your web host doesn’t support PHP, don’t waste your time – or your web site – with your current host. Just switch to where I host my own sites.
- WARNING: Don’t forget to delete the phpinfo.php file from your web site. Hackers can figure out a lot of stuff from this page!



