D
D
Danil Sysoev2017-09-05 18:22:40
PHP
Danil Sysoev, 2017-09-05 18:22:40

Why doesn't PHP syntax work in PHPStorm?

Guys, hello. I work with code in which everything is inserted into html. The file itself is in php format.
However, everything written in is ignored. Is there any way to fix this? PS Everything that is written before the beginning of html works properly. Replacing <??> with <?php?> doesn't help. <??>
7c9fecfb6b99416abceaa89512641850.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander N++, 2017-09-05
@YoungOldMan

1 use full tags short tags are disabled by default on new versions.
only <?=?> output allowed
2 in storm set php version
cropme.ru/0cfa6b47d9ae0b496f61f8e868697194
file -> project settings -> languages ​​& freamworks -> php

E
Elfer, 2020-06-28
@Elfer

I join the author of the question. I'll clarify the problem.
It appears when you write html code in a file, specify a div tag, and between the opening and closing div tags, PHPStorm highlights the zone with a strange color and does not recognize the PHP code. And if you specify any other tag instead of div , everything is fine there.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question