 |
 |
Php Cli
|
 |
|
 |
|
Grizzled Veteran
Join Date: Jun 2002
Status:
Offline
|
|
Hey guys,
I'm not much of a UNIX buff, but I'm wondering, is it possible to send plain text PHP/HTML to the CLI tool, and have it spit out the processed PHP/HTML?
And if so, how?
Thanks,
Oliver
|
|
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Jan 2001
Location: Mahwah, NJ USA
Status:
Offline
|
|
Originally posted by iOliverC:
Hey guys,
I'm not much of a UNIX buff, but I'm wondering, is it possible to send plain text PHP/HTML to the CLI tool, and have it spit out the processed PHP/HTML?
And if so, how?
Sure... it's called a web browser. Something like:
mozilla somefile.php
or
mozilla somefile.html
It will open mozilla (if you have it installed in your path) with the file as input and it will "process" it.
|
|
-DU-...etc...
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Dec 2001
Location: Atlanta, GA, USA
Status:
Offline
|
|
Originally posted by iOliverC:
I'm not much of a UNIX buff, but I'm wondering, is it possible to send plain text PHP/HTML to the CLI tool, and have it spit out the processed PHP/HTML?
Depending on how you installed PHP (I used the entropy.ch package), you can just do:
Code:
/usr/bin/php test.php
If you want to capture the output into a file, do:
Code:
/usr/bin/php test.php > testoutput.html
|
|
Mac Pro 2x 2.66 GHz Dual core, Apple TV 160GB, two Windows XP PCs
|
| |
|
|
|
 |
|
 |
|
Grizzled Veteran
Join Date: Jun 2002
Status:
Offline
|
|
Originally posted by Arkham_c:
Depending on how you installed PHP (I used the entropy.ch package), you can just do:
Code:
/usr/bin/php test.php
If you want to capture the output into a file, do:
Code:
/usr/bin/php test.php > testoutput.html
Thats what I wanted to hear  .
Is the OS X default installation available at /usr/bin/php?
Thanks,
Oliver
|
|
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Jun 2002
Location: UK
Status:
Offline
|
|
Originally posted by iOliverC:
Thats what I wanted to hear .
Is the OS X default installation available at /usr/bin/php?
Thanks,
Oliver
In Mac OS X 10.3, yes
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Oct 1999
Location: San Jose, Ca
Status:
Offline
|
|
It should be noted that this is exactly what HyperEdit uses to do live PHP rendering.
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|