如果编辑器不识别文件类型,会导致语法无法高亮等。让Eclipse或者Zend Studio识别该文件类型以设置语法高亮等功能的方法如下:(本文以增加.class文件为例)
|
1 |
preference → general → content types → php content type add *.class |
如图:
Zend Studio 7.0 官方下载地址:
Windows版:http://downloads.zend.com/studio-eclipse/7.0.0/ZendStudio-7.0.0.exe
MacOS版:http://downloads.zend.com/studio-eclipse/7.0.0/ZendStudio-7.0.0.dmg
Linux-32位:http://downloads.zend.com/studio-eclipse/7.0.0/ZendStudio-7.0.0.tar.gz
Linux-64位:http://downloads.zend.com/studio-eclipse/7.0.0/ZendStudio-7.0.0-x86_64.tar.gz
Continue reading →
Window->Preference->General->Content Types->Text->PHP Content Type
在File associattions 下用Add添加上 *.class即可
现在以“.class”结尾的文件就可以高亮显示代码了。