I'm new: Why php code is seen as "simple" text.

Hi!

I'm new on using phpStorm and I'm really happy using it! Yesterday i got an issue and I'm  not sure why it is...  Basically typing a php code inside an HTML doc sometimes is seen as simple text and not processed.
See these images:
2016-01-17_1106.png
Same code updated:
2016-01-17_11062.png
as you can see the first <?php require... is correct  the second one (in cyan color inside the DIV block) is not processed!

I've also noticed if I try to copy/paste php code in this block i have an empty paste (!) but if I di a "paste simple" command the text is pasted ( as simple text).

Here another test:
2016-01-17_1119.png

If I run the script it works and no errors occured.

What I'm missing  on phpStorm ?

Thanks for any suggestion!

4 comments
Comment actions Permalink

Hi there,

Please show screenshot of your "Settings/Preferences | Editor | Language Injections" -- you must have somehow created an injection rule that makes things messy.

0
Comment actions Permalink

Thanks for help!

This is my setting:

2016-01-17_1306.png

0
Comment actions Permalink

Just delete the entry that is selected (blue background) on your screenshot -- it injects JS into <div> tags making PHP treated as plain text(?).

0
Comment actions Permalink

Yes, thanks! It fixed!

Just a note: in meantime I installed phpStorm on laptop too and moved same project. I had all working perfectly with... same setting as previous pict ( all checked boxes).

0

Please sign in to leave a comment.