Netbeans PHP语法在模板文件中突出显示

I'm using netbeans 7.4 for my PHP web application which is based on Savant3 templating system.

However, when I put PHP code inside .tpl file, it is not considered as inline PHP code. It displays error saying "Unexpected character(s) ? found Unexpected token LESS found" wherever I put PHP opening tag (). And in meantime, it does not highlight the PHP code inside html attribute. Both these errors are highlighted in my uploaded image.

enter image description here

How can I resolve this? Thanks!

Go to Tools -> Options -> Miscellaneous -> Files

In the File Extension dropdown choose tpl

In the Associate File Type (MIME) dropdown choose text/x-php5