Eclipse PDT isn't highlighting PHP syntax in .html files?

瘦欲@ 提交于 2019-12-01 07:15:39

问题


So, I'm doing code maintenance and our php codes are embedded in html files.

Eclipse isn't highlighting any of the php codes in the html file.

Does anyone have any ideas how to do this? I've tried looking for it in the preferences and my google ninja skills fail me.

Thank you in advance.


回答1:


  1. window > preferences > general > content types
  2. Under "text" find "PHP Content type"
  3. add "*.html"
  4. Close the file and reopen it again. Restart eclipse won't work, since whatever .html file that have already been open when you restart will appear again. I had to close the .html file tab that I was viewing and reopen it.

Thanks again!




回答2:


Just figured this out. Man was this frustrating. mythicalprogrammer is right. Couple things to remember.

  1. Uninstall Aptanna plugin if you have it.
  2. Don't know if this will help, but you might need to install pdt. (Php Development Tools) Tools installed.
  3. Make sure to close all your windows in eclipse and restart the program, and after following mythicalprogrammers advice you should be good to go.

Good luck.



来源:https://stackoverflow.com/questions/4319708/eclipse-pdt-isnt-highlighting-php-syntax-in-html-files

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!