Spent several days to study how to use PHP running EXE program under IIS7.5, finally a bit of success, although the operation is successful but a lot of restrictions, such as now only run "pure background" of the program, directly upload the file form of the image also failed (upload Photo stream can be successful), still need to try further.
Here's a brief look at the things to be careful about:
1. Configure the Site Directory permissions to increase the IUSR account;
2. Configure the Cmd.exe file permissions to increase the IUSR account;
3. If necessary, add the IUSR account to Administrator privileges (but this is a big security risk, so consider it carefully);
4. A very important point--php use EXEC () and other functions, can only execute "pure background" program, otherwise it will cause the case of the program card dead;
The PHP code is as follows:
Execution result ". $result;? >
The source code for Opf.exe is as follows:
#include
using namespace std; int main (int argc,char*argv[]) { file* FILE =fopen ("D:\\wwwroot\\a.txt" , "W"); fprintf (file, "good morning!"); fclose (file); return 2;}
The above describes the use of PHP under the IIS75 to run EXE program summary, including the aspects of the content, I hope that the PHP tutorial interested in a friend helpful.