First, the file to be downloaded
1. php core file, which is compiled by vc6
2. apache server
3. mysql database
Step 1 unzip and install the above three files. Find the conf/httpd. conv file in the apace installation directory.
Step 2 search for this part of LoadModule configuration in the file and add the following content
# Load apache into the php Processing Module
LoadModule php5_module php installation directory/php5apache2_2.dll
# This is used to specify the php INI File
PHPIniDir "php installation directory"
# Fixed syntax: When apace reads a file ending with. php or. phtml
AddType application/x-httpd-php. php. phtml
Step 3. Find the php. ini-development file in the php installation directory and change the file name to php. ini.
Step 4: Add the following content under extension_dir = "./" in php. ini:
Specify the php extension library path here. Only in this way can php support database operations, graphic development, and other functions.
Extension_dir = "php installation directory/ext"
NOTE: Annotations In the INI file are implemented through;
Step 5 search and find in php. ini
Extension = php_mysql.dll
Extension = php_mysqli.dll
And remove the previous ";" to access the mysql database through php.
The following is a test example. Remember to restart the server:
[Php]
<? Php
// Test whether php configuration is normal
// Phpinfo ();
// Test whether mysql can be connected
/* $ Conn = mysql_connect ("localhost", "root", "root"); // database connection username and password
If ($ conn ){
Echo "OK"; // connect
} Else {
Echo "error"; // cannot connect
}*/
?>