Visual Web Developer 2008 Express 版中的语法突出显示
如何查看哪些文件扩展名与哪种语法突出显示相关? 不幸的是,工具 -> 选项-> 文本编辑器 -> 文件扩展名
仅列出手动输入的扩展名,没有默认的扩展名。 我自己也没能通过谷歌或其他方式找到它。
我的具体问题是,我希望 .inc 与 .asp 一样突出显示,但我不确定 .asp 使用哪个编辑器。 我确实尝试了以下操作(没有任何效果):
- Web 表单编辑器
- VBscript 编辑器
- HTML 编辑器
- 脚本编辑器
(从某种意义上说,它们确实有效,它们以某种方式为我的代码着色,但它与我得到的突出显示不同 <代码>.asp 文件)。
How can I see which file extensions are related to which kind of syntax highlighting? Unfortunately, Tools -> Options -> Text Editor -> File Extensions
lists only those entered manually, no default ones. And I didn't manage to find it on my own via Google or other means.
My particular problem is, I want to have .inc highlighted exactly as .asp but I'm not sure which editor is used for .asp. I did try the following (none worked):
- Web Form Editor
- VBscript Editor
- HTML Editor
- Script Editor
(They did work in a sense that they colored my code in one way or another, but it wasn't the same highlight as I get for .asp
files).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
非 .asp 文件存在安全问题。 问题是,如果直接在 URL 中访问该文件,则可以查看该文件的完整代码。
建议的解决方法(作为奖励解决您的问题)是创建一个相同的 .asp 文件并更改 .inc 文件以包含 .asp 文件
There are a security problem with non .asp files. The problem is that you can view the full code of the file if you access to the file directly in the URL.
Recommended workaround (that solves your problem as a bonus) is to create a identical .asp file and change the .inc file to includes the .asp file
实际上我不能(可能是由于服务器配置),.inc 文件被完全视为 .asp。 尽管我意识到了这个安全问题,但目前我只是将文件重命名为 .asp ;)谢谢 Eduardo。
但我的问题仍然存在...
Actually I can't (probably due to the server configuration), .inc files are treated exactly as .asp. Though I'm aware of this security problem and for the time being I just rename files to .asp ;) Thank you Eduardo.
But my question still stays...