PHP语法检查NetBeans中的.html文件 [英] PHP syntax check on .html files in NetBeans

查看:224
本文介绍了PHP语法检查NetBeans中的.html文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为我的PHP开发使用NetBeans IDE 8.0.1。



我喜欢netbeans中的语法检查功能。但是我遇到的问题是,它只适用于具有.php扩展名的文件。



我在使用.html扩展名的文件中使用了很多php代码, NetBeans中没有针对这些文件的PHP语法检查功能。

是否可以为.html文件启用php语法检查?

解决方案


$ b


  • 转至工具|选项| Miscellanous

  • 从文件扩展名中选择文件选项卡

  • ,选择HTML

  • from Associated MIME type,select text / x-php5



然后,NetBeans将所有HTML文件视为PHP文件


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?

解决方案

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

这篇关于PHP语法检查NetBeans中的.html文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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