Home >Backend Development >PHP Tutorial >Build a php environment in xp, install php and configure it

Build a php environment in xp, install php and configure it

WBOY
WBOYOriginal
2016-07-29 09:05:191492browse

Like the previous article, here is the download link for Baidu Cloud: http://pan.baidu.com/s/1jGZ8xVK

If you want to try the download process, please see below:

php The official website download URL: http://windows.php.net/download/

Click in and pull it to the bottom of the webpage:

Build a php environment in xp, install php and configure it

After downloading, unzip it to the appropriate directory

The following also needs to be configured:

a)php.ini-development is php.ini

Build a php environment in xp, install php and configure it

b) Open the php.ini file and uncomment the following lines

Set time zone

Find the keyword: date .timezone


For example, change it to: date.timezone = PRC

d) At this time, you need to associate the relationship between apache and php

Open httpd.conf in the Apache24conf directory

Find the corresponding location based on the keyword: #LoadModule. Under the corresponding location, add the following two lines of codeBuild a php environment in xp, install php and configure it

LoadModule php5_module "E:/setup/xp/php5.4/php5apache2_4.dll" PHPIniDir "E:/setup/xp/php5.4/"

The meaning of the above two lines of code is to load the php module and inform apache of the php configuration file


e

)Add a suffix that can be parsed

Find AddType application/x-compress .Z based on the keywordBuild a php environment in xp, install php and configure itThen add the following three lines of code:

AddType application/x-httpd-php .php AddType application/x-httpd-php .html AddType application/x-httpd-php .htm

f) test code

In the previous article, we configured the root of apache Directory, go to our root directory, create a new .txt document, and write in it phpinfo();

?>

Build a php environment in xp, install php and configure itAfter saving and closing, change the suffix to .php




Then restart the server and let’s experiment in the browser!

Build a php environment in xp, install php and configure it
Successfully configured the environment!

The above introduces how to build a PHP environment, install PHP and configure it in XP, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
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