Alex Rivera | Logout

How to run abc.exe using php

Asked 2012-09-03T16:52:24.857
13

I want php file to run exe file and display the exe file content when user goes to a particular url. I am trying to run exe file using php function exec('abc.exe');. But I only see blank page.

Anyone know how to solve it or how to run exe file from php file correctly? Many thanks in advance.

Edit
Report

1 Answer

12

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().

answered 2012-09-03T16:54:34.193

Your Answer