PhpStorm header.php文件显示为灰色 [英] PhpStorm header.php file is greyed out

查看:125
本文介绍了PhpStorm header.php文件显示为灰色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用PhpStorm,由于某些原因,在我所有的项目中, header.php 文件都被弄乱了.它只是变灰了,PhpStorm无法识别名为 header.php 的特定文件中的PHP.其余的工作正常.

I'm using PhpStorm and for some reason in all of my projects the header.php file got messed up. It's just greyed out and PhpStorm doesn't recognize the PHP in the specific files named header.php. The rest is working fine.

这让我发疯,我无法弄清楚.我已经检查了文件模板,将其重置为默认值.没有任何帮助.

It's driving me crazy and I can't figure it out. I already checked file templates, reset it to default. Nothing helps.

谢谢您提供任何解决方案.

I would appreciate any solution, thanks.

推荐答案

  1. 转到设置/首选项|编辑器文件类型
  2. 在顶部表格中找到 Text 条目
  3. 在底部表格中找到并删除 header.php (或非常相似的)模式,然后将其删除.
  1. Go to Settings/Preferences | Editor | File Types
  2. Locate Text entry in top table
  3. Locate and remove header.php (or very similar one) pattern from bottom table and remove it.

现在,您已经以某种方式告诉IDE将此类文件视为纯文本,并且对所有名为 header.php 的文件都执行此操作,而不管它们的位置如何(很可能是在创建新的 header 文件,但忘记输入 .php 部分).

Right now you have somehow told IDE to treat such file as Plain text and it does it for all files named header.php regardless of their location (quite likely it happened when you were creating new header file and forgot to enter .php part).

这篇关于PhpStorm header.php文件显示为灰色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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