first , Need to be in windows
<https://link.jianshu.com?t=http://www.nosee123.com/world/tag/windows/> Install the following environment :

1.apache <https://link.jianshu.com?t=http://www.nosee123.com/world/tag/apache/>
The server

2.VC14 Support package

If your windows
<https://link.jianshu.com?t=http://www.nosee123.com/world/tag/windows/>
The above two environments have not been installed , Please refer to the articles on this website :

“ How to windows 7 Install multiple under apache service
<https://link.jianshu.com?t=http://www.nosee123.com/world/2016/10/15/apache2423/>
”( Install the first apache
<https://link.jianshu.com?t=http://www.nosee123.com/world/tag/apache/>
Same principle , The point is that ports don't conflict )

about vc Description of the support package :

stay windows lower , different php
<https://link.jianshu.com?t=http://www.nosee123.com/world/tag/php/>
Version and different apache All versions need corresponding vc Support package , Here you need to pay attention to what you download apache and php
<https://link.jianshu.com?t=http://www.nosee123.com/world/tag/php/>
What version is it . Now I'll make a comparison table for you :

VC9:Microsoft Visual C++ 2008

VC11:Microsoft Visual C++ 2012

VC14:Microsoft Visual C++ 2015


Here I installed apache Version is :httpd-2.4.23-win64-VC14;php Version is :php-7.0.12-Win32-VC14-x64; So I need to install vc Support package is :VC14:Microsoft
Visual C++ 2015,

VC14 The download address of the operating environment is :
https://www.microsoft.com/zh-cn/download/confirmation.aspx?id=48145
<https://link.jianshu.com?t=https://www.microsoft.com/zh-cn/download/confirmation.aspx?id=48145>

okay , Set up the above two environments , So we can start installing our php 了 , Please look down :

One , download php

Official download address :http://windows.php.net/download/
<https://link.jianshu.com?t=http://windows.php.net/download/>

About to download zip Extract the file to the specified directory , For example, I unzip it to D:\wamp\php7 ,

Then run the following command in the directory to check PHP Version information :php -v

If your VC Environment not installed ( Or wrong version ) The following error will pop up :

okay , It's that simple . Now we start to configure

Two , to configure httpd.conf

In your installation apache Found in directory conf/httpd.conf And open

1)  add to PHP modular

lookup “Dynamic Shared Object (DSO) Support” Part of . Probably in 62 Near the line . And add the following code at the end :

LoadModule php7_module D:/wamp/php7/php7apache2_4.dll

2) add extension

lookup “AddType” Part of . Probably in 409 Near the line , And add the following active codes at the end :

AddType application/x-httpd-php .php

AddType application/x-httpd-php-source .phps

3) appoint php.ini Profile path

stay httpd.conf Specified in the document PHP configuration file php.ini Contents of , Here we go to httpd.conf End of file , Add on last line of text The following code :

PHPIniDir "D:/wamp/php7"( there “D:/wamp/php7” For you php.ini Actual path of file storage )

4) to configure DirectoryIndex

lookup “DirectoryIndex” Part of , About 282 That's ok , stay DirectoryIndex Add one after “index.php”

And PHP dependent Apache Configuration is complete .

Special reminder : change Apache Do not forget to restart the Apache!

Three , to configure php.ini

first , take php Under the installation directory php.ini-production Renamed php.ini

open php.ini, Make the following changes :

1) set up php Extension path for

lookup extension_dir = "ext" , Remove the semicolon

2) Open common php extend , as :

extension=php_mbstring.dll(php Multibyte string extension )

extension=php_mysql.dll(mysql Library extension )

extension=php_mysql.dll(mysqli Library extension )

Opening mode : Find the above extensions , Put the semicolon in front of you (;) Just delete it .

3) Set default time zone

date.timezone = Asia/Shanghai

okay , That's about Windows Install configuration on server PHP7.0 To , Let's test it

Four , test

In your apache Create a new one under the site directory index.php ( It could be another name, of course ),

Open with text editor ( Like Notepad ), Add the following code to it , preservation

<?php

phpinfo();

?>

Then type in the browser http://localhost/index.php visit , You will see the following page
author :Nosee123 link :https://www.jianshu.com/p/63195ff92062 Source : A brief book
Copyright belongs to the author . For commercial reprint, please contact the author for authorization , For non-commercial reprint, please indicate the source .