user3748265
user3748265

Reputation: 389

Mac Computer PHP learning

Hello I'm new in Mac and PHP.

I download MAMP server and Atom editor. I write some code in Atom editor and save as hello.php but when i tried to open page, it could open atom editor page.

here is my code. What should i do?

<html>
<head>
  <title> PHP Hello </title>
</head>
<body>
<center>
<b>
  <h1>
<?php
  print "Hello World";

?>
</h1>
</b>
</center>
</body>
</html>

Upvotes: 0

Views: 45

Answers (1)

Al Foиce    ѫ
Al Foиce ѫ

Reputation: 4315

How do you open the page ? If the page is in your www (or whatever it is named on MAMP), you have to type in your browser

http://localhost/hello.php

or (strictly equivalent)

http://127.0.0.1/hello.php

Upvotes: 1

Related Questions