Configuring IIS for Windows 7 and support for PHP, making your PC a small server

  

Because of the need of work, it is often necessary to provide design prototypes for everyone to access, but some designs are being modified, each time uploading to the server Trouble, so configure your own notebook (Windows7 system) IIS and support for PHP, easy to Aclure generated prototypes others can directly access, the following detailed steps to share the configuration to everyone;

This is free of the database The installation is relatively simple, step by step:

First, install IIS for Windows7

Go: Control Panel > Programs and Features" Open or close Windows function, find Internet information service Click on the previous box to fill it, as shown below:



After the installation is successful, open a browser and enter http://127.0. 0.1 (new window directly open), if you enter the following interface, it means the installation is successful;


If you only need the other party to access some html pages or use asp, you do not need to configure P HP, you can go to the Control Panel > Administrative Tools Inter Information Service (IIS) Manager to make simple settings, change the physical location of the website directory, and then put the page into the directory to access it (need to turn off the firewall); It is also possible to change the directory. The default directory is in the corresponding location under the C drive.


Second, download and configure PHP

1, download PHP, windows.php.net/downloads/releases/php-5.3.2-Win32-VC9-x86 .zip" target="_blank">Click here to download PHP5.3 directly from the official website, or you can go to the official website to view the download → PHP For Windows.

2. Unzip the downloaded zip archive to the C drive, and extract it to C:\\php;

3, enter the control panel>Administrative Tools>Inter Information Service (IIS) Management

4, as shown below (often need to enter the page), double-click to enter the ISAPI filter:


5, right click in the middle, select add, as shown below Fill in, select the appropriate file and determine:


6, then enter the 4 page, double-click to enter the handler mapping, right click in the middle, select add script mapping, fill in the following figure, select the corresponding File and determine:


7. Click on the application pool on the left, right click in the middle, select Add Application Pool, fill in the following figure, select the corresponding value and confirm:


8. Enter the 4 page again, double-click to enter the default document, click Add in the middle, fill in and confirm as shown below:


9, enter C: \\php directory, rename the file php.ini-list file named php.ini and copy it to c:\\windows directory;

10, modify c:\\windows\\php.ini file (with notepad Open it, search for extension=php, Go to the box in the picture below and delete the previous one;


Search for extension_dir=change it to extension_dir = "c:\\php\\ext\\", Save and check and save;

11, open C:\\php directory, find libmcrypt.dll, libmysql.dll, php5ts.dll three files and copy them to F:/windows/System32 directory; Br>

At this point, the setup process is over, create the index.php file in the default website directory (can be created with Notepad, save as index.php, not index.php.txt), write content < ;?php phpinfo();?> can, then visit http://127.0.0.1/index.php to check whether the configuration is successful;

Note: You can also learn to install Xampp, which automatically configures Apache Service, support for PHP, MySQL, phpMyAdmin, it is also more convenient, I am not installing on my own computer because I want my system to be as simple as possible, and I do not use database and database management, and IIS service does not need to be manually started, as long as networking Other users with LAN can access it (provided the firewall is turned off).

PS: If you need to install WordPress, Discuz and other site programs on your computer, then the database is essential, you need to continue to install the database, or choose to install Xampp, this is not much to introduce, online There are a lot of tutorials, you can also ask me (I am a rookie, can only learn together).

Excerpt from: dboy~小真の365天

Copyright © Windows knowledge All Rights Reserved