Execute .exe included within a PHP project [closed]

-1

It is possible to execute an .exe file included in the directory of a PHP project, if it can be executed as I can see the result of it in a PHP page.

    
asked by nullptr 09.01.2018 в 22:46
source

1 answer

1

Assuming that your PHP application runs on a windows server, if you can run an .exe file, if this .exe returns some information you can also display it as text in php using the shell_exec () that executes a command using the command interpreter and returns the complete output as a string

For example:

<?php
$salida = shell_exec('abc.exe'); //Si el archivo abc.exe esta en el mismo directorio que el script PHP, sino poner la ruta completa del archivo
echo "<pre>$salida</pre>";
?>
    
answered by 10.01.2018 / 00:18
source