note 56846 deleted from features.commandline by cmb

From: Date: Sun, 30 Jun 2019 09:54:00 +0000
Subject: note 56846 deleted from features.commandline by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-211440@lists.php.net to get a copy of this message
Note Submitter: php at schabdach dot de ---- To pass more than 9 arguments to your php-script on Windows, you can use the 'shift'-command in a batch file. After using 'shift', %1 becomes %0, %2 becomes %1 and so on - so you can fetch argument 10 etc. Here's an example - hopefully ready-to-use - batch file: foo.bat: --------- @echo off :init_arg set args= :get_arg shift if "%0"=="" goto :finish_arg set args=%args% %0 goto :get_arg :finish_arg set php=C:\path\to\php.exe set ini=C:\path\to\php.ini %php% -c %ini% foo.php %args% --------- Usage on commandline: foo -1 -2 -3 -4 -5 -6 -7 -8 -9 -foo -bar A print_r($argv) will give you all of the passed arguments.

« previous php.notes (#211440) next »