Apache configuration:
Edit the httpd. conf file
(1) find:
# Loadmodule rewrite_module modules/mod_rewrite.so and remove "#" from the previous line, because this is required to use Zend framework, at least for now.
Add the following lines at the end of the file: (change the path as needed)
ScriptAlias/PHP/"C:/PHP /"
Addtype application/X-httpd-PHP. php
Action application/X-httpd-PHP "/PHP/php-cgi.exe"
In this way, the PhP5 program can run normally.
(2) locate AllowOverride none.
Changed:
AllowOverride all to make the/htaccess file take effect. The Apache configuration is complete.
(3) restart the Apache server and edit index. php as follows:
<? PHP
Phpinfo ();
?>
Put it in the root directory of your website, open your browser, and enter: http: // localhost
Press enter. If the PHP basic configuration information is displayed, the configuration is successful.