Home  >  Article  >  Backend Development  >  Eclipse 中 PHP Editor 联系关系 CakePHP *ctp 文件

Eclipse 中 PHP Editor 联系关系 CakePHP *ctp 文件

WBOY
WBOYOriginal
2016-06-13 13:25:21906browse

Eclipse 中 PHP Editor 关联 CakePHP *.ctp 文件
最近在玩CakePHP,这个框架的View文件扩展名全是.ctp,这样编辑的时候没有php的高亮显示感觉很不爽,所以就试了试让他用Eclipse自带的PHP Editor:
1>在打开的ctp文件中点击右键,选择preferences

 Eclipse 中 PHP Editor 联系关系 CakePHP *ctp 文件

2>在弹出的窗口中点击Editor
3>点击File Associations,在弹出的窗口的File type列表框旁边点击Add,添加*.ctp.然后保持选中*.ctp的状态不变,在下面的列表框附近点击Add,为*.ctp添加Associated Editor,选中PHP Editor

 Eclipse 中 PHP Editor 联系关系 CakePHP *ctp 文件

4>在2>中弹出的窗口中选择Content Types,展开Text,找到PHP Content Type,然后添加*.ctp.


 Eclipse 中 PHP Editor 联系关系 CakePHP *ctp 文件

5>到此设置完成,你再打开ctp文件的时候高亮显示就是php的了。


 Eclipse 中 PHP Editor 联系关系 CakePHP *ctp 文件

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