First, Need towindows
<> Install the following environment:

1.apache <>
The server

2.VC14 Support package

If yourwindows
The above two environments have not been installed, Please refer to the articles on this website:

“ How to be inwindows 7 Install multiple under apache service
”( Install the firstapache
Same principle, The point is that ports don't conflict)

aboutvc Description of the support package:

staywindows lower, Differentphp
Version and differentapache All versions need correspondingvc Support package, Here you need to pay attention to what you downloadapache andphp
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 installedapache Version is:httpd-2.4.23-win64-VC14;php Version is:php-7.0.12-Win32-VC14-x64; So I need to installvc Support package is:VC14:Microsoft
Visual C++ 2015,

VC14 The download address of the operating environment is:

Okay, Set up the above two environments, So we can start installing ourphp 了, Please look down:

One, downloadphp

Official download address:

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

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

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

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

Two, To configurehttpd.conf

In your installationapache Found in directoryconf/httpd.conf And open

1)  Add toPHP Modular

lookup“Dynamic Shared Object (DSO) Support” Part of. Presumably62 Near the bank. And add the following code at the end:

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

2) add extension

lookup“AddType” Part of. Presumably409 Near the bank, And add the following active codes at the end:

AddType application/x-httpd-php .php

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

3) Appointphp.ini Profile path

stayhttpd.conf Specified in the documentPHP configuration filephp.ini Directory, Here we go tohttpd.conf End of file, Add on last line of text The following code:

PHPIniDir "D:/wamp/php7"( There“D:/wamp/php7” For youphp.ini Actual path of file storage)

4) To configureDirectoryIndex

lookup“DirectoryIndex” Part of, Probably in282 That's ok, stayDirectoryIndex Add one after“index.php”

AndPHP DependentApache Configuration is complete.

Special reminder: changeApache Do not forget to restart theApache!

Three, To configurephp.ini

First, takephp Under the installation directoryphp.ini-production Renamed asphp.ini

openphp.ini, Make the following changes:

1) Set upphp Extension path for

lookup extension_dir = "ext" , Remove the semicolon

2) Open commonphp 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(;) Delete it..

3) Set default time zone

date.timezone = Asia/Shanghai

Okay, That's aboutWindows Install configuration on serverPHP7.0 Steps, Let's test it

Four, test

In yoursapache Create a new one under the site directoryindex.php ( It could be another name, of course),

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




Then type in the browserhttp://localhost/index.php Visit, You will see the following page
author:Nosee123 link: Source: Brief book
Copyright belongs to the author. For commercial reprint, please contact the author for authorization, For non-commercial reprint, please indicate the source.