Posted by bobmct on 06/03/06 10:07
vito wrote:
> how to config the linux to know the path of /usr/bin/php so no need to
> type it before running a php script every time?
You need a "shabang" at the top of your script. That is... a line to tell
the shell which program to use to run this script.
First, determine the path of your php interpreter with this command:
"which php"
and it should print out something like "/usr/bin/php"
what ever it states, use it verbatim at the top of your script (the VERY
FIRST statement) similar to this:
#!/usr/bin/php
<?php
Then save your script and it will run as you expect.
Good luck,
Bob
[Back to original message]
|