IIS configuration PHP environment

First go to the php official website

http://php.net/downloads.php


then extract the files to their own directory
open php.ini-development of this document, the extensions are enabled, which is the front; remove

this extension_dir = "ext" remember to change Absolute path of own ext

Then rename the php.ini-development file to php.ini, make a copy and put it in C: \ Windows (otherwise mysqli and other modules may not be loaded correctly)
Finally, do n’t forget to set the storage directory of the session file Configuration:
The default settings in the file are :; session.save_path = "/ tmp", change to your own directory, and then enable session.save_path = "D: / web / session"
Remember to change the permissions of the folder where the session file is stored Editable

Install IIS CGI module





Then there is no problem

Finally test

If you want to use php as the homepage, you can add an index.php as the default homepage in the default document.

Then create a new index.php file in the IIS website path, enter the following content

<?php
echo "Hello World!";
?>

Finally open the browser to verify

About connecting mysql

Remember to set the path of the previous ext, and copy a copy of php.ini to the C: \ Windows directory, this pit has taken me a long time

Guess you like

Origin www.cnblogs.com/wstong/p/12722324.html