Rename the php.ini-development configuration file to the PHP.ini profile. Then do the following configuration operations:
1. Open the PHP.ini configuration file to find
1 2 |
; On Windows: ; Extension_dir = "ext" |
Revision changed to
1 2 |
; On Windows: Extension_dir = "C:/php/ext" |
Represents the specific directory for the specified PHP expansion pack in order to invoke the appropriate DLL file.
2, because the default PHP does not support automatic connection to MySQL, you need to open the corresponding expansion library functions, such as Php_mysql.dll, will be
1 2 3 4 5 6 7 |
Extension=php_curl.dll Extension=php_gd2.dll Extension=php_mbstring.dll Extension=php_mysql.dll Extension=php_pdo_mysql.dll Extension=php_pdo_odbc.dll Extension=php_xmlrpc.dll |
These extension before the semicolon (;) removed.
3. Configure the session function of PHP
When using the session function, we must configure the session file on the server to save the directory, otherwise we can not use the session, we need to create a new read-write directory folder on Windows 7, this directory is best independent of the Web main program directory, Here I established the Phpsessiontmp directory on the D-Packing directory and found it in the php.ini configuration file.
1 |
; Session.save_path = "/tmp" |
Revision changed to
1 |
Session.save_path = "D:/phpsessiontmp" |
4, configure the PHP file upload function
As with the session, when using PHP file Upload function, we must specify a temporary folder to complete the file upload function, or the file upload function will fail, we still need to create a read-write directory folder on Windows 7, Here I established the Phpfileuploadtmp directory on the D-Packing directory and found it in the php.ini configuration file.
Revision changed to
1 |
Upload_tmp_dir = "D:/phpfileuploadtmp" |
Upload size: upload_max_filesize = 2M
Number of single uploads: Max_file_uploads = 20
5. Modify Date.timezone, otherwise the date part will be error when executing phpinfo:
Warning:phpinfo () [Function.phpinfo] ...
We need to
Revision changed to
1 |
Date.timezone = Asia/shanghai |
Win7 Configuring the php.ini file in IIS