Please help me that how can execute windows .exe in PHP with input and output CSV file as parameters and return the result in output CSV file? I have no idea about its functionality.
Asked
Active
Viewed 108 times
-2
-
Thanx for suggestion @Labradorcode. but i want execute with input and output CSV file as parameters and return the result in output CSV file. Is it possible? – Amarjeet Singh Nov 15 '19 at 09:57
2 Answers
0
You can use shell_exec
to run the exe file. Which takes command
as the parameter.
$output = shell_exec("sample.exe <param1> <param2>");
Here param1
and param2
are the parameter/file path which exe accepts.
Refer this document link.

Vinay Patil
- 736
- 6
- 19
-
But i want execute with input and output CSV file as parameters and return the result in output CSV file. Is it possible? – Amarjeet Singh Nov 15 '19 at 09:58
-
-
0
$answer = shell_exec("absolute path to exe file");
echo $answer."</br>";

ameer nagvenkar
- 381
- 1
- 10
-
But i want execute with input and output CSV file as parameters and return the result in output CSV file. Is it possible? – Amarjeet Singh Nov 15 '19 at 09:58
-
$answer = shell_exec("absolute path to exe file $arguements"); echo $answer.""; About handling the csv that you have to handle in the exe program thats written – ameer nagvenkar Nov 15 '19 at 10:01