How to run .php script multiple times in batch using cmd? -
i have small php script looks :
<?php $argument1 = $argv[1]; echo "passed value:".$argument1; //do passed value //echo processed value ?> i want run multiple times using cmd.
this how run :
c:\php\php.exe myscript.php 1 i want run above cmd line multiple times different values ranging 1 100.
could tell me how can run multiple times different values passed it?
note:
i want able read output of each php call , copy it
(for /l %x in (1,1,100) c:\php\php.exe myscript.php %x)>output.txt 2>&1 >output.txt redirects stdout file. 2>&1 redirects stderr same place.
(note: command line syntax. use in batchfile, use %%x instead of %x)
Comments
Post a Comment