Can not type php tags in html file

Hi, I'm new in phpstorm. I'm doing my first website. I have some .HTML in my project, and I want to add some php code on it, but... Phpstorm do not recognice the php tags in the html file.
Also I have the same problem on WebStorm...
What I'm doing wrong??
Thanks for the help.

2 comments
Comment actions Permalink

Hi, try to rename .html file to .php (or .html.php) - easiest option. Alternatively go to File | Settings | Editor | File Types, find PHP and add full html filename (e.g. index.html) to the list of registered patterns under PHP.

1
Comment actions Permalink

It works!!

Thanks a lot!!

0

Please sign in to leave a comment.