I’m learning how to use PHP. I’m trying to run a simple PHP script. But when I run it in Google Chrome, nothing is displayed. Here’s my code:
<html>
<body>
<?php
echo "Hello World";
?>
</html>
</body>
I’m running XAMMP Apache and the Eclipse Aptana plugin.
You are close, you are closing your tags wrong, try
A cleaner better test would be
Also make sure you have PHP installed as well. XAMPP is a great solution for local machine website hosting for testing things like PHP. It will install everything you need, and even gives you a nice service manager and more.
When testing in google chrome, right click on the page and click “inspect element”, you can then see the pure HTML, and see what is really there.
http://www.apachefriends.org/en/xampp.html