Search code examples
phphtmlnetbeansnetbeans-pluginssyntax-checking

PHP syntax check on .html files in NetBeans


I am using NetBeans IDE 8.0.1 for my PHP development.

I like the syntax check feature in netbeans. But the problem that I have is that it only works with files that have .php extension .

I am using a lot of php code in files with .html extension, and no php syntax checking is being available in NetBeans for those files.

Is it possible to enable php syntax checking for .html files?


Solution

  • One hacky way to do that:

    • go to Tools|Options|Miscellanous
    • select Files tab
    • from File extensions, select HTML
    • from Associated MIME type, select text/x-php5

    Then NetBeans will consider all HTML files as PHP ones