Configuration of PHP
1. Open the extracted C:\Program files (x86) \php-5.3.5 folder
1 |
将php.ini-development文件并更改名称为php.ini(留个备份,好习惯) |
2. Find Extension_dir
1 |
更改为extension_dir = "C:\Program Files (x86)\php-5.3.5\ext" |
3. Find Default_charset
1 |
更改为default_charset = "utf-8" |
4. Remove the semicolon annotations from the front of these extension
123456 |
extension=php_gd2.dll extension=php_imap.dll extension=php_mbstring.dll extension=php_exif.dll extension=php_mysql.dll extension=php_mysqli.dll |
5. Find Date.timezone
Configuration of Apache httpd.conf
1, LoadModule Php5_module
12 |
LoadModule php5_module "C:\Program Files (x86)\php-5.3.5\php5apache2_2.dll" (注意php5apache2_2.dll名称要与C:\Program Files (x86)\php-5.3.5的php5apache2_2.dll名称统一) PHPIniDir "C:\Program Files (x86)\php-5.3.5" (此为php-5.3.5的解压目录) |
2. Find AddType
1 |
添加AddType application /x-httpd-php .php |
3. Change here to
123 |
<IfModule dir_module> DirectoryIndex index.html index.php < /IfModule > |
Test
Locate the project root that the Apache server DocumentRoot points to htdocs new index.php file
and add code
123 |
<?php echo phpinfo(); ?> |
Test
How to build a PHP development environment