I have encountered this tangle problem when I Just configured the lamp environment. I still don't know where the error is?
Write a phpinfo. php file in the working directory, and enter the path to open it, as shown in;
But what you get with localhost/phpinfo. php is shown in;
Then, find some information on the Internet, modify the httpd. conf file, and enter localhost/phpinfo. php again, as shown in;
Why?
The configuration of the httpd. conf file of Apache in the first example is as follows:
//////////////////////////////////////// //////////////////////////////////////// //////////////////////////////////////// ////////////////////////////////////////
[Apache configuration]
5.1> httpd. conf (D:/lamp/apache2.2/conf)
5.1.1> # function: load the PHP Module
# Note: Search for loadmodule and add it after it
Loadmodule php5_module "D:/lamp/PHP/php5apache2_2.dll"
5.1.2> # function: Set the working directory
# Note: Search for DocumentRoot and change it
DocumentRoot "D:/lamp/sites"
5.1.3> # function: Set directory options
# Note: Search for <directory "D:/lamp/apache2.2/htdocs"> and change it
<Directory "D:/lamp/sites">
5.1.4> # function: Set the default document
# Note: Search <directory/> and add
Directoryindex index. php index.html
5.1.5> # function: adds the PHP type.
# Note: Add at the end of the file
Addtype application/X-httpd-PHP. html. php
# Function: directory of PHP. ini
# Note: Add at the end of the file
Phpinidir "D:/lamp/PHP"
Function: the directory cannot be accessed.
: Search options indexes followsymlinks and comment out
# Options indexes followsymlinks
5.2> Note: After the configuration file is modified, restart Apache to take effect.
5.3> create a file in D:/lamp/sites/
# Phpinfo. php
Input content:
<? PHP
Phpinfo ();
?>
Access: http: // localhost/phpinfo. php
//////////////////////////////////////// //////////////////////////////////////// //////////////////////////////////////// //////////////////////////////////////// As shown above, the ticket is unsuccessful. Please advise.