# Run php file in MAC OS X

**URL:** https://forum.kirupa.com/t/run-php-file-in-mac-os-x/243010
**Category:** programming
**Created:** [November 1, 2007, 5:49pm UTC](https://forum.kirupa.com/t/run-php-file-in-mac-os-x/243010 "2007-11-01T17:49:25Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![davelaruedrum](https://avatars.discourse-cdn.com/v4/letter/d/4da419/32.png) [@davelaruedrum](https://forum.kirupa.com/u/davelaruedrum)
#### Post date: [November 1, 2007, 5:49pm UTC](https://forum.kirupa.com/t/run-php-file-in-mac-os-x/243010/1 "2007-11-01T17:49:25Z")

</div>

Hi,  
I’m totally new to PHP. I installed the latest PHP on my macbook and now i just want to run a .php file. I’m using Dreamweaver to program, and Safari/Firefox to view.  
I made a simple program which echo’s “hello David”. However, when i double-click the file, the browser displays the coding!!! Like this:

```auto

<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Untitled Document</title>
</head>

<body>

<?php
$txt="hello David";
echo $txt;
?>

</body>
</html>

```

I know…typical ‘newbie’ question 🙂 But, hey, thats how you learn.  
Anyone know how to do this in OS X?

Cheers,

Dave
