I am trying to display my php files but all I seem to get is the source code. I am running mac 10.7.5 I have installed MAMP and added a file (test.php) to the htdocs folder. I have turned the apache server on.
the code in the file is
<html>
<head>
<title>:-)</title>
</head>
<body>
<?php
echo "<p>Hello, world. I'm a php file.</p>";
?>
</body>
</html>
and when I point my browser (chrome) to this file it shows the source code exactly as above.
Any help would be great!
Thanks.
http://localhost.... Also make sure php files have the right file extension.http://localhost/orhttp://127.0.0.1/?