第一次运行PHP项目(phpstorm+wampserver)

时间:2021-04-27 16:57:35

1、配置环境

1)vcredist_x64,wampserver2.5-Apache-2.4.9-Mysql-5.6.17-php5.5.12-64b,如下图

 

第一次运行PHP项目(phpstorm+wampserver)

 

(1)安装vcredist_x64

 

第一次运行PHP项目(phpstorm+wampserver)
 

(2)安装wampserver2.5-Apache-2.4.9-Mysql-5.6.17-php5.5.12-64b

 

第一次运行PHP项目(phpstorm+wampserver)
 

一直点next,软件最好不要安装在C盘

 

第一次运行PHP项目(phpstorm+wampserver)
 

选择打开

 

第一次运行PHP项目(phpstorm+wampserver)
5

 

第一次运行PHP项目(phpstorm+wampserver)
 

2、开始我们的项目

(1)创建PHP项目

 

第一次运行PHP项目(phpstorm+wampserver)
 

选择路径,注:php文件必须建在www目录下,下面是我的:

 

第一次运行PHP项目(phpstorm+wampserver)
 

创建一个PHP文件

 

第一次运行PHP项目(phpstorm+wampserver)
 

 

第一次运行PHP项目(phpstorm+wampserver)
 

(2)编写内容

 

第一次运行PHP项目(phpstorm+wampserver)
 

(3)此时直接点击浏览器图标运行会找不到文件

 

第一次运行PHP项目(phpstorm+wampserver)
 

我们需要接下来操作。

第一步,点击File->Settings,

 

第一次运行PHP项目(phpstorm+wampserver)
 

或者点击弹出警告框的红色框选出部分

 

第一次运行PHP项目(phpstorm+wampserver)
 

第二步,选择CLI Interpreter后面的‘...’,

 

第一次运行PHP项目(phpstorm+wampserver)
 

点击‘+’号,选择第二个选项

 

第一次运行PHP项目(phpstorm+wampserver)
 

第三步,选择PHP executable后面的‘...’,

 

第一次运行PHP项目(phpstorm+wampserver)
 

选择你自己安装的wampserver安装目录下面的php.exe文件,例如我的:D:\wamp\bin\php\php5.5.12

 

第一次运行PHP项目(phpstorm+wampserver)
 

然后,点击确定

 

第一次运行PHP项目(phpstorm+wampserver)
 

(4)选择浏览器图标,运行代码

 

第一次运行PHP项目(phpstorm+wampserver)
 

我们的项目就ok啦

第一次运行PHP项目(phpstorm+wampserver)