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

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.

Answers


  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!


Need Your Help

Which listener can know that the JTextPane value is changed?

java swing events jtextpane

I would like to know the JTextPane content is changed, I implemented the keyboard listener, but it is only detect keyboard event, if the user paste the text via mouse or drag the text inside, I am ...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.