We can use php as a shell script by adding the line below at the top of the php script file.
#!/usr/local/bin/php -Cq
C means do not change working directory to that of the script.
q means do not send HTTP header.
There is a reference manual "Using PHP from the command line" in php.net
星期三, 10月 29, 2008
PHP Shell Script
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言