-2

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.

  • 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 Answers2

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
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