I need a small information regarding executing a .exe file using PHP script. I read that one can execute an .exe file using exec() or passthru() or echo system().
Is it possible to run .exe file stored on my windows machine say on C: directory or the .exe file should be stored on the web server to run it through the php script.
If so I need to provide the path for the .exe file to the exec() function, for example:
file.exe is stored on C:\Programs\mydocs\file.exe.
Can I store this path in a variable like
$path = C:\Programs\mydocs\file.exe;
and pass it like echo exec($path);
Loads of questions, I would like to know the views from the PHP profis.
Thanks
No, your example is a syntax error
Yes, if you quote the string :-