Maison php教程 php手册 php环境搭建wampserver、Apache、Mysql和php - 无影飞絮剑

php环境搭建wampserver、Apache、Mysql和php - 无影飞絮剑

May 20, 2016 am 11:39 AM

wampserver2.5-Apache-2.4.9-Mysql-5.6.17-php5.5.12-32b搭建php环境

在win下,下载wampserver2.5-Apache-2.4.9-Mysql-5.6.17-php5.5.12-32b.exe,默认安装。

然后打开安装目录下apache的httpd.conf配置文件D:\wamp\bin\apache\apache2.4.9\conf\httpd.conf

修改如下:

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

<span style="color: #008080;"> 1</span> Listen 0.0.0.0:8088

<span style="color: #008080;"> 2</span> Listen [::0]:8088

<span style="color: #008080;"> 3</span>

<span style="color: #008080;"> 4</span> ServerName localhost:8088

<span style="color: #008080;"> 5</span>

<span style="color: #008080;"> 6</span> DocumentRoot "D:/kkkoffice/wwwroot"

<span style="color: #008080;"> 7</span>

<span style="color: #008080;"> 8</span> <directory></directory>

<span style="color: #008080;"> 9</span>     <span style="color: #008000;">#</span><span style="color: #008000;">AllowOverride none</span>

<span style="color: #008080;">10</span>     <span style="color: #008000;">#</span><span style="color: #008000;">Require all denied</span>

<span style="color: #008080;">11</span> <span style="color: #000000;">    Options FollowSymLinks

</span><span style="color: #008080;">12</span> <span style="color: #000000;">    AllowOverride None

</span><span style="color: #008080;">13</span>     Order deny,<span style="color: #000000;">allow

</span><span style="color: #008080;">14</span>     <span style="color: #008000;">#</span><span style="color: #008000;">Deny from all</span>

<span style="color: #008080;">15</span> <span style="color: #000000;">    allow from all

</span><span style="color: #008080;">16</span>

<span style="color: #008080;">17</span>

<span style="color: #008080;">18</span> <directory>

<span style="color: #008080;">19</span> <span style="color: #000000;">   Options FollowSymLinks

</span><span style="color: #008080;">20</span> <span style="color: #000000;">   AllowOverride None

</span><span style="color: #008080;">21</span>    Order deny,<span style="color: #000000;">allow

</span><span style="color: #008080;">22</span> <span style="color: #000000;">   allow from all

</span><span style="color: #008080;">23</span> </directory>

Copier après la connexion
View Code

说明:

Listen  监听端口

ServerName  服务器名字(带有端口号)

DocumentRoot  php文件路径(注意:最后面一定不要带"/")

 

可能出现的问题:访问 http://localhost:8088/phpinfo.php

如果出现You don't have permission to access /test/file.php on this server

注释Deny from all          ----拒绝所有想访问

添加allow from all

每次修改完apache的httpd.conf都记得要重启apache

重启刷新页面正常访问如下

  

好啦,环境已经搭建成功!

 

Déclaration de ce site Web
Le contenu de cet article est volontairement contribué par les internautes et les droits d'auteur appartiennent à l'auteur original. Ce site n'assume aucune responsabilité légale correspondante. Si vous trouvez un contenu suspecté de plagiat ou de contrefaçon, veuillez contacter admin@php.cn

Article chaud

Repo: Comment relancer ses coéquipiers
3 Il y a quelques semaines By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Crystals d'énergie expliqués et ce qu'ils font (cristal jaune)
1 Il y a quelques semaines By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: Comment obtenir des graines géantes
3 Il y a quelques semaines By 尊渡假赌尊渡假赌尊渡假赌
Combien de temps faut-il pour battre Split Fiction?
3 Il y a quelques semaines By DDD

Article chaud

Repo: Comment relancer ses coéquipiers
3 Il y a quelques semaines By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Crystals d'énergie expliqués et ce qu'ils font (cristal jaune)
1 Il y a quelques semaines By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: Comment obtenir des graines géantes
3 Il y a quelques semaines By 尊渡假赌尊渡假赌尊渡假赌
Combien de temps faut-il pour battre Split Fiction?
3 Il y a quelques semaines By DDD

Tags d'article chaud

Bloc-notes++7.3.1

Bloc-notes++7.3.1

Éditeur de code facile à utiliser et gratuit

SublimeText3 version chinoise

SublimeText3 version chinoise

Version chinoise, très simple à utiliser

Envoyer Studio 13.0.1

Envoyer Studio 13.0.1

Puissant environnement de développement intégré PHP

Dreamweaver CS6

Dreamweaver CS6

Outils de développement Web visuel

SublimeText3 version Mac

SublimeText3 version Mac

Logiciel d'édition de code au niveau de Dieu (SublimeText3)