New to PHP

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ojsimon
Forum Newbie
Posts: 24
Joined: Sat Mar 31, 2007 5:01 am

New to PHP

Post by ojsimon »

hi
i have a mac and am starting to learn the basis of php. I am trying to make a PHP document in a text editor called "BBEdit lite for mac os x" however when i save the code as main.php and open it in my browsers, "firefox" "opera" and "safari" it just shows the text code i am using. please help
Thanks
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

You need something that parses the php script.
Often that's php installed as module of a webserver.
see http://www.php.net/manual/en/install.php
You might also be interested in http://www.apachefriends.org/en/xampp.html
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Post by califdon »

Just to clarify a little:
As Volta implied, PHP is not interpreted by browsers, so you cannot just point your browser at your PHP script. It is interpreted by the web server before being sent to the browser, so the browser only receives the results of processing the script. Another way of saying it is that PHP is server side technology.
Post Reply