In my experience, web *browsers* will show the source of .php files, if
viewed directly.  What you want is apache, the webserver; then put the
.php file(s) into your webroot, prolly /var/www/html/ and then start
apache and point your browser to http://localhost/coolfile.php and
you're golden, so long as the .php file doesn't need anything else.

To be precise, PHP is a programming language, which is generally
compiled and run within a webserver, and is in-line with and/or outputs
HTML for the client who is browsing it.  Sometimes they are complex and
use a database, for example, so the PHP file you're interested in might
require more, server-side, than you're prepared to provide.

If you copied the output of a page from some site, and saved it as
somefile.php, you probably actually have the HTML output from that
server, and can view it *without* running a webserver like apache, just
point your browser to file://tmp/or/whatever/somefile.php or rename the
file to .html and try that, if you have a problem.  If you fancy saving
[portions of] web pages you visit, I can suggest using mozilla, then
selecting from the menu, File -> Edit Page, whereupon you can cut out
undesirable bits and resave the page as you like.

It sounds like you're new to such things, as "play" is not usually
terminology associated with .php files.  If you mean some different kind
of .php file, then sorry for this bother!  Otherwise, you might want to
be perusing http://tldp.org -- the howto's and faq's are superb!

hope this helps, and enjoy playing around,

   Ben


On Sun, 12 Oct 2003 22:48:02 -0700
Linux Rocks! <[EMAIL PROTECTED]> wrote:

| Played? do you mean PHP Hypertext Preprocessor? as in webpages? if so,
| I think any modern browser and parse PHP just fine. I think even
| lynx/link does!
| 
| If you mean something other than webpages, please send more details...
| 
| Jamie
| 
| Dirk Ouellette [EMAIL PROTECTED] wrote:
| > Can .php files be played in linux? If so, how?
| > Thanks, Dirk
_______________________________________________
EuG-LUG mailing list
[EMAIL PROTECTED]
http://mailman.efn.org/cgi-bin/listinfo/eug-lug

Reply via email to