문제

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)

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top