Using PHP’s system function, how can you pass arguments to a batch file?
It would probably look something like this
system("batch.bat argument", $output);
I found out how to do it with a C++ executable here
I’m guessing it should be relatively simple…
What the real question is is how to receive the argument with a batch file?
You are right, there is no difference. Here is a small demo:
First a batch file to just output its arguments:
A php program that uses
systemto invoke the batch file passingaandbas args:On running the php, the call to
systeminvokes the bat file withaandbas arguments, the batch file runs and echoesaandb