PhpStorm header.php file is greyed out

无人久伴 提交于 2021-02-08 07:51:01

问题


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:


  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.

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).



来源:https://stackoverflow.com/questions/56143292/phpstorm-header-php-file-is-greyed-out

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!