2

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!

2
  • I have the same problem using netbeans 8.0 Commented Jul 22, 2014 at 7:47
  • Well recently I found out that netbeans does not support Savant3. So the only option is, make .php files(even for templates) instead of .tpl files. Commented Jul 22, 2014 at 8:19

1 Answer 1

4

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

In the File Extension dropdown choose tpl

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

Sign up to request clarification or add additional context in comments.

1 Comment

theres a default plugin in netbeans 8.1 called PHP Smarty Framework, But it is not working as per expectations. For eg. PHP is considered as string in it and there is no syntax highlighting in PHP. and if you comment any html portion instead of <!-- xyz --> it comments like {* xyz *} which is worse. But your trick worked. Thanx.. +1...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.