Netbeans PHP语法在模板文件中突出显示 [英] Netbeans PHP syntax highlight in template file

查看:70
本文介绍了Netbeans PHP语法在模板文件中突出显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在基于 Savant3 模板系统的PHP Web应用程序中使用了netbeans 7.4.

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

但是,当我将PHP代码放入.tpl文件时,它不被视为嵌入式PHP代码. 无论我将PHP开头标记()放在何处,都会显示错误消息"Unexpected character(s) ? found Unexpected token LESS found".同时,它不会在html属性中突出显示PHP代码.这两个错误均在我上传的图片中突出显示.

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.

我该如何解决?谢谢!

推荐答案

转到工具->选项->其他->文件

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

File Extension下拉列表中,选择tpl

Associate File Type (MIME)下拉列表中,选择text/x-php5

这篇关于Netbeans PHP语法在模板文件中突出显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆