IIS Environment
- Take the php installation directory c: \ php as an example. First, find c: \ php \ sapi \ php4ts. dll file, copy it to the windows System directory (% windows %/system32 directory in windows XP ).
- Add a file association in IIS to map the. php file to c: \ php \ sapi \ php4isapi. dll.
- Edit the c: \ php. ini file, find the register_globals string through the search function, and change the Off value after the equals sign to On. This setting will enable the session function. Similarly, find the extension_dir option, set it to c: \ php \ extensions, and then find the session. set the save_path option to c: \ tmp. Make sure the folder exists. If it does not exist, create a new one. Copy the php. ini file to the windows Installation Directory (% windows %,
- Restart the system and the php website will work.
Apache Environment
- Open httpd. conf
- Add the php type: AddType application/x-httpd-php. php
- Set the php Directory: ScriptAlias/php/"D:/Apache Group/php-4.4.0-Win32 /"
- Set default document: DirectoryIndex index.html. var index. php default. php
Install the gd graphics library
- Copy php_gd2.dll under the % php %/extension directory to % windir %/system32/
- Set in php. ini; extension = php_gd2.dll
Remove the semicolon and save php. ini.
- Restart the web Server
- Call the phpinfo () function. If the gd segment settings appear, the installation is successful.