Eclipse PDT 没有突出显示 .html 文件中的 PHP 语法?

发布于 2024-10-05 11:10:22 字数 143 浏览 0 评论 0原文

所以,我正在做代码维护,我们的php代码嵌入到html文件中。

Eclipse 不会突出显示 html 文件中的任何 php 代码。

有谁知道如何做到这一点?我尝试在首选项中寻找它,但我的谷歌忍者技能让我失败。

先感谢您。

So, I'm doing code maintenance and our php codes are embedded in html files.

Eclipse isn't highlighting any of the php codes in the html file.

Does anyone have any ideas how to do this? I've tried looking for it in the preferences and my google ninja skills fail me.

Thank you in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

情栀口红 2024-10-12 11:10:22
  1. 窗口>偏好>一般>内容类型
  2. 在“文本”下找到“PHP 内容类型”
  3. 添加“*.html”
  4. 关闭文件并再次重新打开。重新启动 eclipse 将不起作用,因为重新启动时已经打开的任何 .html 文件都会再次出现。我必须关闭正在查看的 .html 文件选项卡并重新打开它。

再次感谢!

  1. window > preferences > general > content types
  2. Under "text" find "PHP Content type"
  3. add "*.html"
  4. Close the file and reopen it again. Restart eclipse won't work, since whatever .html file that have already been open when you restart will appear again. I had to close the .html file tab that I was viewing and reopen it.

Thanks again!

〗斷ホ乔殘χμё〖 2024-10-12 11:10:22

刚刚想通了这一点。男人真是太令人沮丧了。
神话程序员是对的。
有几件事要记住。

  1. 如果有 Aptanna 插件,请将其卸载。
  2. 不知道这是否有帮助,但您可能需要安装 pdt。 (Php 开发工具)安装的工具。
  3. 确保关闭 Eclipse 中的所有窗口并重新启动程序,在遵循神话程序员的建议后,您应该可以开始了。

祝你好运。

Just figured this out. Man was this frustrating.
mythicalprogrammer is right.
Couple things to remember.

  1. Uninstall Aptanna plugin if you have it.
  2. Don't know if this will help, but you might need to install pdt. (Php Development Tools) Tools installed.
  3. Make sure to close all your windows in eclipse and restart the program, and after following mythicalprogrammers advice you should be good to go.

Good luck.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文