|
You can do "PHP filename.php" on the command line to have PHP parse the script properly. You'd have to either output that to a file or pipe it to the browser... not sure how to do that in OS X just yet. Some editors probably do this (BBEdit doesn't though).
Directly accessing a PHP script from any browser will just result in the text of the file in the web browser. Browsers only understand the client-side aspects of a page, not the server-side scripts. (Unless, like someone mentioned, there's a plugin or something that does the parsing for it.)
Regardless of which PHP package is installed, the only way to get Apache to parse and serve the PHP scripts to the browser is to access the page using http:// which would require going either through localhost or a virtual host setup to point to the folder that contains the files. Any reference using file:// does not go through the web server.
|