Passing arguments from PHP

Advertisement

moduor
Guest

Passing arguments from PHP

I am using php to execute cmd which executes my batch file. Is there a way to pass my php variables to the batch file? Below is my php code which is working well:
exec('c:\WINDOWS\system32\cmd.exe /c START C:\inetpub\.....\sync.bat');

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,392
Location:
Prague, Czechia

But that still does not make this WinSCP question.

But anyway, you pass variables to the argument as with any other string in PHP:

exec("c:\WINDOWS\system32\cmd.exe /c START C:\inetpub\.....\sync.bat $variable1 $variable2");

Reply with quote

Advertisement

You can post new topics in this forum