Home > Backend Development > PHP Tutorial > Customize the php development environment_PHP tutorial

Customize the php development environment_PHP tutorial

WBOY
Release: 2016-07-14 10:06:39
Original
830 people have browsed it

The files you need to download first
1. PHP core file, the version is compiled with vc6
2. apache server
3. mysql database

The first step is to unzip and install the above three files. Find the conf/httpd.conv file in the apace installation directory
The second step is to search and find the part that configures LoadModule in the file, and add the following content
#Let apache load the php processing module
LoadModule php5_module php installation directory/php5apache2_2.dll

#This is used to specify the ini file of php
PHPIniDir "php installation directory"
#Fixed writing method, the function is that when apace reads a file ending in .php or .phtml, it is regarded as php
AddType application/x-httpd-php .php .phtml
The third step is to find the php.ini-development file in the php installation directory and change its file name to php.ini
Step 4: In the extension_dir="./" part of php.ini, add the following content below it
;Specify the php extension library path here. Only in this way can php support database operations, graphics development and other functions
extension_dir = "php installation directory/ext"
Note: The comments in the ini file are implemented through;
The fifth step is to search in php.ini and find
extension=php_mysql.dll
extension=php_mysqli.dll
These two items, and remove the ";" in front, so that the mysql database can be accessed through php

The following is a test example, remember to restart the server:
[php]
//Test whether php is configured properly
//phpinfo();
//Test whether mysql can connect
/*$conn=mysql_connect("localhost","root","root"); //Database connection username and password
If($conn){
          echo "ok";//Can connect
}else {
          echo "error";//Cannot connect
}*/  

?>

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/477922.htmlTechArticleThe first files you need to download are 1. PHP core file, the version is compiled with vc6 2. Apache server 3. mysql database The first step is to unzip and install the above three files. Find...
in the apace installation directory
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template