Heim  >  Artikel  >  php教程  >  Mac版PhpStorm之XAMPP整合apache服务器配置

Mac版PhpStorm之XAMPP整合apache服务器配置

WBOY
WBOYOriginal
2016-10-12 09:50:101875Durchsuche

选择在PhpStorm集成apache服务器,下面是我自己的亲测的步骤。

 

1.如何修改apache默认端口

xampp apache默认的http访问端口是80

修改完成后在xampp中重启apache。

2.配置流程

打开Settings / Preferences 找到 Build, Execution, Deployment 选项,点击 Deployment 添加如下:

 

 

因为我们修改了默认端口80,所以这里一定要指明端口号。目录是/Applications/XAMPP/xamppfiles/etc/httpd.cof,这个是apache默认的网站运行目录,所以一定要是这个目录或者它的子目录才行。

3.xampp启动apache

 

 

测试一下:

在web path(/Applications/XAMPP/htdocs)的目录下hello.php执行:

<span style="font-size: 16px;"><span style="color: #000000;">php

</span><span style="color: #008000;">/*</span><span style="color: #008000;">*
 * Created by PhpStorm.
 * User: edwin
 * Date: 2016/10/12
 * Time: 上午12:30
 </span><span style="color: #008000;">*/</span>
<span style="color: #0000ff;">echo</span> 'Hello OK';</span>

 

接下来就可以在浏览器中访问下了,如下所示:

 
Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn
Vorheriger Artikel:tp5附件Nächster Artikel:Apache2 httpd.conf配置文件中文版详解