LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   php command line scripts (http://www.linuxquestions.org/questions/programming-9/php-command-line-scripts-251620/)

naflan 11-05-2004 05:55 PM

php command line scripts
 
I just discovered that php can be used to write shell scripts. Anyone ever try this?



php command line

musicman_ace 11-05-2004 06:10 PM

Most web developers use this as well as the DB connecting functions to create dynamic contect generation.

mgatny 11-07-2004 01:07 PM

This is a rather excellent feature of PHP, and it really makes sense when:

- You have an existing body of code that you are running within your webserver, and you want to leverage that when writing maintenance scripts, e.g. cron jobs.

- You're an experienced PHP developer, but are not familar enough with the UNIX shell, or other scripting options languages like Perl and Python.

sheds 11-08-2004 11:34 PM

How does this work? I heard about it but i have no idea how that goes.

naflan 11-09-2004 07:05 AM

Quote:

How does this work? I heard about it but i have no idea how that goes.
See here

Cedrik 11-09-2004 08:02 AM

It is good to test quickly some php code...
Code:

php -r 'echo str_replace("borks", "rocks", "php in command line borks")."\n";'


All times are GMT -5. The time now is 08:15 PM.