Home  >  Article  >  php教程  >  phpStorm 配置关联php手册

phpStorm 配置关联php手册

WBOY
WBOYOriginal
2016-06-08 08:56:141883browse

  php开发中我尝试过很多个编辑器,但用的最多的是phpStorm ,但一直因为英文太烂,很多phpStorm功能,都没用过。。

最近发现有些编辑器可以 选中函数名,通过相应的快捷键就可以调用 浏览器 打开相应 函数的 在线帮助文档。

一番查找,我终于发现 phpStorm 也有相应的功能:

    工具栏  view 选项   -> external documentation

即 选中 函数名 后 按 shift + f1  就可以打开 相应函数的 在线帮助文档。

如 在php文件中选中 strtolower   按 shift + f1 浏览器就打开 http://www.php.net/manual/en/function.strtolower.php  

但发现 默认的关联的函数帮助是英文网页,需要自己选择语言.....   开始我想是不是phpStorm那里可以配置

把 http://www.php.net/manual/en/function.函数名.php 替换为 http://www.php.net/manual/zh/function.函数名.php

,但没找到......(如果可以求告知!)

 

后来在网上搜索发现自己可以自己配置关联相应的外部文档,当然我就可以自己定义我的手册了! (感谢google!)

部分功能实现参照:

1、 http://devnet.jetbrains.com/thread/432741;jsessionid=2B5041C15738ACB0E57DBA28C34C5004   教训:看到英文就跳过了,里面有完整的实现。

2、http://bbs.bathome.net/thread-23284-1-1.html

步骤如下:

1、菜单栏 File  ->  settings  或者 直接点击 工具栏 上那个  扳手 图标  直接进入 phpStorm的设置

2、打开 IDE settings 下 的 External Tools  添加点击 + 号添加 菜单

 

3、如下图所示 填入相应的参数  配置菜单:

Program : 填写浏览器的路径

Parameters: -a  http://www.php.net/zh/function.$SelectedText$.php    (里面的$SelectedText$ 表示选中的文本)

其他参数自己定;

 

 

怎么使用呢?

下面就是使用的截图: 鼠标选中相应的  函数名   右键 就可以看到 php_manal 这个选项 点击里面的  phpmanual_在线版 就可以打开  函数的中文在线帮助文档。

当然 你也可以自己配置phpmanual 本地版 ,与在线版不同的是:

1、下载一个 KeyHH.exe ,地址是 http://web.archive.org/web/20110106120642/http://keyworks.net/   安装后会在 C:/Windows  下出现一个 KeyHH.exe

2、本地有一个 chm 格式的 php手册;

phpmanual 本地版 配置如下:

Program : C:\Windows\KeyHH.exe (或 KeyHH) 

Parameter: -#klink $SelectedText$ F:\manual\php_manual_zh.chm (F:\manual\php_manual_zh.chm 表示php 手册的路径)

 

 

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn