Home  >  Article  >  Backend Development  >  Win10 php development environment setup

Win10 php development environment setup

不言
不言Original
2018-03-29 13:16:017641browse

This article introduces the establishment of a PHP development environment under win10. The process is also relatively detailed. Friends in need can take a look.

1. Install php

Download and unzip php7 to d:\php7
http://windows.php.net/ download#php-7.0 Select the appropriate version to download

2. Install Apache

Download and unzip Apache to d :\Apache24 (note, it can only be decompressed to the root directory of the disk)
http://www.apachehaus.com/cgi-bin/download.plx#APACHE24VC14

3. Configure php

Copy d:\php7\php.ini-development to the same directory and change the name to php.ini
Open d:\php7\php.ini
Find; extension_dir = "ext" and change it to extension_dir = "ext", that is, remove the preceding semicolon
If you use mysqli, find;extension=php_mysqli.dll, change it to extension=php_mysqli.dll, and remove the semicolon in front


4. Configure apache

Open d:\Apache24\conf\httpd.conf
Find Define SRVROOT "/ Apache24" modified to Define SRVROOT "D:/Apache24"
Find Listen 80 Modified to Listen 8080
Append
# to the end of the file ##AddType application/x-httpd-php .php .html .htm
PHPIniDir "d:/php7/php.ini"
LoadModule php7_module "d:/php7/php7apache2_4.dll"

5. Set environment variables

Right click on My Computer, Properties->Advanced, find the bottom The environment variable button
select the PATH variable of the current user, edit
and create the following entry:
D:\Apache24\bin
D:\php7
D:\php7\ext
Confirm all the way and close these windows

6. Install the Apache service and start it

Open the command line as an administrator and execute httpd.exe -k install
Then execute httpd -k restart

At this time, you should be able to see Apache’s success page by visiting 127.0.0.1:8080


7. Create a new test page

Open d:\Apache24\conf\httpd.conf
Find
DocumentRoot "${SRVROOT}/htdocs"

In the In step 4, we defined SRVROOT as "D:/Apache24"
So the page access path at this time is D:/Apache24/htdocs
Enter this path , you will find that there is the index.html
we visited in step 6. We create a new hello.php in this directory and enter the following content

echo "hello world!";
?>
Visit 127.0.0.1:8080/hello.php to see the effect

Of course you can also customize the root path, then the php file must be placed in the corresponding directory
DocumentRoot "d: /webapps"



Configure phpstorm

By configuring phpstorm and combining it with chrome's jetbrains-ide-support plug-in,
can realize live edit of the page, that is, modifying the code will display the effect in the browser at the same time
Chrome plug-in download link: http://pan.baidu.com/s/1eRGodaU Password: yewa
Download and install phpstorm, configure php interpreter
After creating a new project and creating a php file, to implement live editing, you only need to open the php file, right-click and select debug 'xxx.php'

Related recommendations:

Install php5.6.32 under ubuntu to complete the php environment setup method

mac php environment setup tutorial: mac php development environment setup and configuration tutorial

Building PHP environment under Linux

The above is the detailed content of Win10 php development environment setup. For more information, please follow other related articles on the PHP Chinese website!

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