How to run PHP under IIS:
1. Install PHP5.3.6
1 ) Turn off the firewall, unzip php5.zip to D:\PHP\php5 (recommended learning: PHP video tutorial)
2) Copy the php.ini files to D:\PHP\ php5 and C:\WINDOWS directory
3) Grant the users group read and execute permissions to the php installation directory (D:\PHP\php5)
4) In D:\PHP\ Find the files named php_mysqli.dll, php_mysql.dll, libmysql.dll, libmcrypt.dll in the php5 folder and copy them to the C:\windows\System32 folder (Note: IIS needs this file to process PHP and MYSQL ).
2. Configure IIS
1) Create a new website under IIS, where your php website files can be stored. For example, the new virtual directory jihetuan points to the E:\jihetuan directory on the computer.
2) Click "Add" on the "Mapping" tab to open the "Add/Edit Application Extension Mapping" dialog box, click "Browse" after "Executable File", and navigate to D: \PHP\php5\php5isapi.dll, enter ".php" in the text box after "Extension" (Note: Be sure to pay attention to the period before the extension), and click OK.
3) Add index.php as the default document in the Document tab. You don’t have to add it.
4) Click "OK" again to exit the "Application Configuration" dialog box, and click "OK" again to exit the PHP Properties dialog box.
5) Restart IIS to take effect.
The above is the detailed content of Can PHP run directly on IIS?. For more information, please follow other related articles on the PHP Chinese website!