
1.2 PhpStorm的下载与安装
PHP的开发工具很多,每种开发工具都有各自的优势。在编写程序时,一款好的开发工具会使开发人员的编码过程更加轻松、有效和快捷,达到事半功倍的效果。本书中是以PhpStorm为开发工具对PHP程序进行开发的。应用PhpStorm开发PHP程序有许多优点,它可以提高用户效率,提供智能代码补全、快速导航及即时检查错误的功能。PhpStorm的版本会不断更新,这里以常用的PhpStorm 9.0.3(以下简称PhpStorm)为例,介绍PhpStorm的下载与安装。
1.2.1 PhpStorm的下载

PhpStorm是JetBrains公司开发的一款商业的PHP集成开发工具,其不同版本可以通过官方网站进行下载。下载地址为:http://www.jetbrains.com/phpstorm。
下载PhpStorm的步骤如下。
(1)在浏览器中输入http://www.jetbrains.com/phpstorm,按<Enter>键进入PhpStorm的主页面,然后单击Download按钮,如图1.12所示。

图1.12 PhpStorm的主页面
(2)在弹出的页面中单击Previous versions超链接,如图1.13所示。

图1.13 单击Previous versions超链接
(3)此时进入PhpStorm不同版本的下载页面,单击页面中的PhpStorm-9.0.3.exe超链接,如图1.14所示。

图1.14 PhpStorm 9.0.3的下载页面
(4)在弹出的对话框中单击“下载”按钮,即可将PhpStorm的安装文件下载到本地计算机上。
1.2.2 PhpStorm的安装

PhpStorm的安装步骤如下。
(1)双击下载的PhpStorm-9.0.3.exe安装文件,打开PhpStorm的安装欢迎页面,单击Next按钮,如图1.15所示。

图1.15 PhpStorm安装欢迎页面
(2)在弹出的PhpStorm许可协议页面中单击I Agree按钮,如图1.16所示。

图1.16 PhpStorm许可协议页面
(3)在弹出的选择安装路径页面中设置PhpStorm的安装路径,这里将安装路径设置为D:\PhpStorm 9.0.3。设置好PhpStorm的安装路径后,单击Next按钮,如图1-17所示。

图1.17 PhpStorm选择安装路径页面
(4)在弹出的PhpStorm安装选项页面中可以设置是否创建PhpStorm的桌面快捷方式,还可以选择创建关联文件。设置完成后单击Next按钮,如图1.18所示。

图1.18 PhpStorm安装选项页面
(5)在弹出的页面中单击Install按钮开始安装PhpStorm,如图1.19所示。

图1.19 单击Install按钮
(6)PhpStorm正在安装页面如图1.20所示。

图1.20 PhpStorm正在安装页面
(7)安装结束后打开如图1.21所示的完成安装页面,在该页面中选择Run PhpStorm复选框,然后单击Finish按钮即可运行PhpStorm。

图1.21 PhpStorm完成安装页面
(8)首次运行PhpStorm时,会弹出如图1.22所示的对话框,提示用户是否需要导入PhpStorm上一版本的配置,这里保持默认选项即可。

图1.22 提示是否导入上一版本的配置对话框
(9)单击OK按钮,打开PhpStorm的许可证激活页面。由于PhpStorm是收费软件,因此这里选择的是30天试用版。如果想使用正式版,则可以通过官方渠道购买。然后单击OK按钮,如图1.23所示。

图1.23 PhpStorm许可证激活页面
(10)在弹出的PhpStorm许可协议页面中,选中Accept all terms of the license复选框接受许可协议,然后单击OK按钮,如图1.24所示。

图1.24 PhpStorm许可协议页面
(11)此时将打开PhpStorm的欢迎页面,同时弹出PhpStorm的初始配置对话框,如图1.25所示。这里保持默认选项即可,直接单击OK按钮关闭初始配置对话框。

图1.25 PhpStorm初始配置对话框
(12)此时将进入PhpStorm的欢迎页面,如图1.26所示。这就表示PhpStorm启动成功了。

图1.26 PhpStorm的欢迎页面