-1

php7.2

Could you help me understand why my code is not working?

<!DOCTYPE html>
<html>
<body>

<h1>My first PHP page</h1>

<?php
echo "Hello World!";
?>

</body>
</html>

Please, have a look at the attached image. I run the built in server.

enter image description here

Michael
  • 4,273
  • 3
  • 40
  • 69
  • does the file have .php extension? Also I am so jealous, I wish I could get back that "Hello World" feeling :) – Dale Sep 01 '18 at 17:03
  • Dale, thank you. This was really the problem. If you organize an answer, I'll gladly accept it. – Michael Sep 01 '18 at 17:05

1 Answers1

2

On a hunch I will take a guess that you are missing the file extension of .php

Dale
  • 10,384
  • 21
  • 34