Summary of using php to run the exe program under IIS75

Source: Internet
Author: User
: 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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.