MrHopko MrHopko - 6 months ago 26
PHP Question

PHP not rendering in HTML

I am using Windows 7 with IIS 7.
I am trying to get started with PHP. I have performed the following:

  1. Installed PHP using the web platform installer

  2. Verified that PHP is installed by using 'Check phpinfo()' on the PHP manager within the root folder of my website (all on my local machine)

When I test to see if PHP is working with a simple HTML page as follows:

<!DOCTYPE html>

echo "My first PHP script!";


Chrome does not render anything. I am expecting to see the text.

Can anyone advise me how to proceed?


Answer Source

If this problem ocurrs check:

  • Does the file have extension .php?
  • Does the path is correct on the server?

Its is important to remember that I am assuming that you have a server with php suport activated. On the server, the default extension to PHP files is .php, but you can check with the administrator to garantee.

You can also check if the error log is enable. When it is disabled, and the code has a syntax error, nothing is showed on the screen. You can read more here: