How to build php in iis

王林
Release: 2023-02-26 16:32:01
Original
3886 people have browsed it

How to build php in iis

1. First, we still need to download a php support package, and then install it

2. We select a disk to create a new path name and install it. Unzip the completed package to this path, then we need to copy the unzipped file to the system disk, copy it to C:\Windows\system32, and then copy "php.ini-dist" to "C:\Windows \php.ini"

3. Then we open Notepad, open the copied "php.ini" file, and change "extension_dir="./"" to "extension_dir="D:\php\ ext""

4. Then we start to configure "mysql":

  extension=php_gd2.dll(用作gd库支持);
  extension=php_mbstring.dll(用作phpmyadmin容错可选);
  extension=php_mysql.dll
  extension=php_mysqli.dll(这两个开放支持mysql和mysqli)
Copy after login

5. Now we open the "Management Tools" in the control panel, open the iis manager, and select our website. Find "Handler Mapping" on the home page of the website

6. After opening it, we open the "Add Module Mapping" dialog box, fill in "FastCgiModule" in the section, and then confirm

7, and then Find "Default Document" on the homepage of the website, click "Add" on the right, add "index.htm", "index.html", and "index.php" respectively, and rank these three files in front, and then confirm

Test the PHP running environment:

Create a new "phpinfo.php" file under the configured site folder, and then enter the following code:

<?php
phpinfo();
?>
Copy after login

Then open the browser , enter "localhost/phpinfo.php", if the PHP screen appears, it means that we have successfully set up the PHP environment.

Recommended tutorial: PHP video tutorial

The above is the detailed content of How to build php in iis. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template