Netbeans PHP syntax highlight in template file

1.9k Views Asked by At

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!

1

There are 1 best solutions below

1
Taras On

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

In the File Extension dropdown choose tpl

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