: This article mainly introduces the summary of using php to run the exe program under IIS75. if you are interested in the PHP Tutorial, refer to it. It took several days to study how to use php to run the exe program under IIS7.5, which is somewhat effective. although it has been successfully run, there are many restrictions. for example, you can only run "pure background" programs, directly uploading an image in the file format also fails (the photo stream can be uploaded successfully), and further attempts are pending.
The following is a brief description of the precautions:
1. configure website directory permissions and add an IUSR account;
2. configure the permission for the cmd.exe file and add an IUSR account;
3. if necessary, add the IUSR account to the administrator's permissions (however, this poses a high security risk, so be careful );
4. very important: php uses exec () and other functions and can only execute "pure background" programs. Otherwise, the program will become stuck;
The php code is as follows:
Execution result ". $ result;?>
In opf.exe, the source code 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 is a summary of the use of php to run the exe program under IIS75, including some content, hope to be helpful to friends who are interested in the PHP Tutorial.