Customize php development environment _ PHP Tutorial

Source: Internet
Author: User
Customize php development environment. First, you need to download the file 1, php core File, version is vc6 compiled 2, apache Server 3, mysql database first step unzip and install the above three files. Find the first file to be downloaded in the apace installation directory.
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]
// 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
}*/

?>

Example 1: php core file. the version is vc6 compiled. 2. apache Server 3. mysql database. Step 1: decompress and install the above three files. In the apace installation directory, find...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.