2

In my PhpStorm, the file index.php, doesn't look like a PHP script, but a plain text file. How can I fix it?

enter image description here

3 Answers 3

2
  • Settings | File Types | Text files
  • Find and remove unwanted pattern there -- I expect this to be index.php or very similar

Similar SO questions:

Sign up to request clarification or add additional context in comments.

Comments

1

Follow this steps:

Open PHPStorm settings by using Ctrl+Alt+S

  1. In search box type File types
  2. Select file types option from left side panel
  3. Find PHP Files (PHP) from Recognized file types
  4. Check for .php extension in below area (Registered Patterns). If not found add PHP.

enter image description here

1 Comment

*.phpexsit,my question is only the file of index.php look like plain text ,the other file of php script is ok.
0

Right click on index.php and select "Mark as PHP".

(This option is there on PHPStorm 7.x, I'm not sure about 6.)

2 Comments

only get the option Mark as Plain Text in other php script. but right click on index.php , can't get the option
File marked as plain text this way will have slightly different file icon.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.