一、command+, 调出webstorm的preferences。或者直接选择webstorm的preferences。 php
二、搜索deployment。 html
三、点击+号,name能够本身随意取,type选择local or mounted folder web
四、connection里面填写2项:
(1)upload/download project file:apache 相应目录地址(即便不作任何配置,把写好的html和php放到这里面,不用任何设置就能够进行页面的查看,如今对webstorm进行配置,这里填的就是这个路径)。
(2)browse file on server:运行地址(个人apache端口号是80,因此我写的是80,不一样人设置的端口号不同,可按需更改)。 apache
五、mappings里面填写2项:
(1)local path:要部署的文件夹地址:(就是webstorm要运行的项目目录)
(2)deployment path on server ‘apache’(relative to folder ‘/applications/xampp/htdocs’):
部署到对应的Apache根目录文件夹。
由于我在connection里就写了完整的文件夹,因此这里写个\就能够了。 浏览器
六、exclude paths: 能够设置哪些文件能够不被上传(我暂时没有设置这个,这个能够不填) app
七、webstorm的tools选择deployment,选择upload to apache。将项目上传到apache,这样点浏览器就能够运行了。
若是不想每次都传的话,能够选择automatic upload. webstorm
八、点击浏览器的小按钮,出现页面,运行成功。
输入员工编号101时,点击查询,service.php的status为200(没有出现恐怖的404),大功告成!!! spa