Environment: window 7, Apache/2.2.19 (Win32) PHP/5.2.9-1
1. Configure the server name
Just remove the #ServerName localhost:80 comment inside.
Re-run the Apache service.
Then you can access http://localhost:80 through the browser. If the page is displayed, it means that apache has been installed and started successfully.
2. Add php support
1 |
|
Add
AddType application/x-httpd-php .php .php5 .php4 .php3 .phtml . phpt
AddType application/x-httpd-php-source .phps
3. Add php.ini directory
1 |
|
4. Update the php.ini file
Change php.ini-DEVELOPMENT under PHP to php.ini
5. Test test.php
Add test under Apache htdocs .php
1 2 3 |
|
The above introduces how to configure Apache to support PHP5, including the content of Apache and php5. I hope it will be helpful to friends who are interested in PHP tutorials.