• - Code, Content, and Presentation
• -- PHP Server Side Scripting
• ---- Running a Php script continuously

jamesa - 4:04 pm on Feb 12, 2006 (gmt 0)

Well in Unix it'd be:
php scriptname.php

might need the full path to php:
/path/to/php scriptname.php

On Windows it'd probably something like
C:\path\to\php scriptname.php

Now if you have anything in the query string, for example scriptname.php?id=1234&color=blue, that wouldn't work on the command line. Instead you can do this:

C:\path\to\php scriptname.php "1234" "blue"

and in the script:

<?

$id =$_SERVER["argv"][1];
$color =$_SERVER["argv"][2];

?>