Home > Topics > IIS > body text

How to configure the PHP running environment in IIS under Windows 10 (detailed steps)

王林
Release: 2022-04-02 14:46:55
forward
13333 people have browsed it

This article will take you through how to configure IIS to run PHP, and introduce how to configure IIS to run PHP under Windows 10. I hope it will be helpful to everyone!

How to configure the PHP running environment in IIS under Windows 10 (detailed steps)

1: Install IIS server

1. Enter Control Panel>>Programs and Features >>Turn Windows features on or off, find Internet Information Services, Remember to select CGI

##2. After the installation is complete, open localhost in the browser and check whether the IIS welcome page can be displayed:

2: Download, install and configure the PHP environment

1. Download PHP, official website address: http://windows.php.net/download/,

2. Unzip the downloaded zip package to the D drive. After decompression: E:\php;
3. Enter Control Panel>>Administrative Tools>>Internet Information Services (IIS) Manager;
4. Select "Handler Mapping" in the middle window and double-click it, then click on the far right Select "Add Module Mapping"

5. In the "Executable File" column, find the PHP installation directory E:\php, right Change the file type in the lower corner to "exe" and you will see the "php-cgi.exe" file

How to configure the PHP running environment in IIS under Windows 10 (detailed steps)

6. Then you can add default documents to the website: default.php and index.php.

How to configure the PHP running environment in IIS under Windows 10 (detailed steps)

You also need to perform the following configuration:

7. Enter the E:\php directory and rename the file php.ini-development to php.ini And copy it to the desktop;

8. Next you need to modify the php.ini file on the desktop.

After opening the php.ini file, use the shortcut key ctrl F Search date.timezone and change it to date.timezone="Asia/Shanghai" to modify the current time zone

Activate the extended options you need, that is, delete the semicolon ";" before the corresponding dll statement

extension=php_gd2.dll

extension=php_mbstring.dll
extension=php_mysql.dll
extension=php_pdo_mysql.dll

Search extension_dir= and change it to

extension_dir = “E:\php\ext\”, save it after modification and checking, and then cut the php.ini file on the desktop to the C:\Windows directory (why not just copy the file directly at the beginning Come here to modify it, because Windows 8 involves permission issues, so copy it to the desktop for modification first, of course you can also put it in other directories for modification)

9.php environment configuration Okay, we can test it. Create a new index.php file in the created website directory (note that it is index.php, not index.php.txt) with the content of "

PS1: (Enter the php installation directory on the command line and enter " php -m" command can view the opened dll extension module)

PS: By the way, I would like to recommend the open source PHP extremely fast background development framework LotusAdmin written by myself.

Ps2: PHP website development requires the mysql database. For the mysql database environment configuration and installation diagram, see (http://www. jb51.net/article/23876.htm).

Free recommendation: IIS installation

The above is the detailed content of How to configure the PHP running environment in IIS under Windows 10 (detailed steps). For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:cnblogs.com
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