[snip]
måndagen den 22 september 2003 kl 14.31 skrev Jay Blanchard:

> exec("php script.php"); will run the script.

How does this look on a OSX/UNIX system? Can the path to php be found 
in a system variable, for convinience and portability of the script?
[/snip]

As usual for *nix type 'which php' which will return the path to the PHP executable. 
For portability you could then do something to the effect of (not tested)

$pathPHP = exec("which php");
exec("$pathPHP script.php");

If you know the path to PHP you can include a bash line at the top of the script and 
remove the php call from the exec.

#!/usr/local/bin/php //(top line of script)

exec("script.php");

See http://www.php.net/manual/en/features.commandline.php for more details

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to