Pregunta

i am trying to find a way to have a PHP script execute a .cpp file, and then return the results via PHP.

I will map out my methodology to avoid confusion in my question:

Certain action on webpage (Button click) -> PHP runs .cpp file -> the results of the .cpp file are returned to PHP -> returned data is used to repopulate the page .

Is this possible to do? (please do not vote down, i have looked online and could not find a solid lead to help me establish this connection)

¿Fue útil?

Solución

I hope you mean to run a built executable...

The exec function will run the application similar to running it through a command line. This means that you can get the standard output of the application like you would through the command line.

How to run abc.exe using php

It's kind of kludgy, if you can, just duplicate the executables functionality in PHP.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top