Re: PHP shell scripting not working right?

From: Date: Mon, 16 Dec 2002 14:53:19 +0000
Subject: Re: PHP shell scripting not working right?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-128404@lists.php.net to get a copy of this message
Ever answered your own question five seconds after asking it? Apparently, I have to type "/path/to/test.php" even though I'm already in the right directory. Leif K-Brooks wrote:
I'm trying to do shell scripting in PHP. I have PHP installed in /usr/bin/php. I have the following script: #!/usr/bin/php -q <?php print "Success!\n"; ?> It's saved as test.php and CHMODed to 777. When I type "test.php" at the command line, it says: bash: test.php: command not found When I type "test", it acts like I just hit enter. Typing "/usr/bin/php -q test.php" does work. Does anyone know what I'm doing wrong?
-- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law.

« previous php.general (#128404) next »