How to run abc.exe using php

Solution 1:

To access the operating system with php you do the following

$answer = shell_exec("abc.exe");
echo $answer."</br>"; 

The $answer string will contain the information that the abc.exe prints out or returns.

You may need to format it using explode().

Solution 2:

You can only run exe files if your php is runnning on a Windows machine. Futhermore, if you are on shared hostig, your hoster may have disabled the exec command.

If you are on a Windows machine, 'abc.exe' must be in the current directory or in the PATH.

To capture the output use:

exec( 'abc.exe', &$output);
echo $output;

Link to exec

Solution 3:

You can use VaccinalBowl code in windows, but for address .exe file, see the following example :

$answer = shell_exec("D://Downloads/software/npp.6.7.9.2.Installer.exe");
echo $answer."</br>";