问题
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:
- Go to
Settings/Preferences | Editor | File Types
- Locate
Text
entry in top table - 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