PHP shell scripting not working right?
| From: | Leif K-Brooks | Date: | Mon, 16 Dec 2002 14:49:21 +0000 |
| Subject: | PHP shell scripting not working right? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-128403@lists.php.net to get a copy of this message | ||
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.