One, Apache after the successful installation of directory structure two, configuration Apache to run PHP program will be, HTML page into the "Htdocs" folder, you can run, however, the. PHP program is placed directly in this directory, can only open, and not run, This problem occurs because Apache has not been configured properly, so there is no way to run the PHP program, so the following two steps to configure: ① load PHP "module", the PHP language Pack "Php5apache2_4.dll" 1. Move the PHP language Pack (the package after you install PHP) to the same directory location as Apache
2. Open the Apache configuration file "httpd.conf" (Apache installation location/conf/httpd.conf), locate "Load code area", and add the statement to load "PHP module"
② specifies the. php suffix of the file, to "find" the "PHP module" processing (execution) after the save, you can run with Apache. PHP Program!
"Note" Specifies another set of code snippets that "PHP modules handle PHP Programs":
AddType application/x-httpd-php. php
Code snippet with PHP5 and PHP7:
B. Configure Apache to process. php files