PhpStorm - php with html highlighting

I use php includes in our intranet pages (to include standard menus that kind of thing) I must have the web page ending in .php for Apache to process the PHP code in the file, but the web page is really HTML markup with a little bit of PHP, however when I use the file in PhpStorm it does not do any of the colouring and highlighting that it would normally do for a web page.  Is there a way to do this?

2 comments
Comment actions Permalink

Hi Jonathan,

Do you mind posting a screenshot of what you are getting right now (whole PhpStorm window, not just part of it)?

The reason I'm asking -- it's possible that you have:

  1. PHP plugin turned off somehow ... (File | Settings | Plugins)
  2. *.php files are not associated with "PHP files" file type inside PhpStorm (File | Settings | File Types) -- usually because of #1
  3. This specific file is associated with Text file (that's in case if highlightning works for some files and does not for others)


If you cannot solve it with any of the above .. that's when screenshot may tell what is wrong.

0
Comment actions Permalink

Thanks suggestion 2 worked. The php plugin was turned on, but *.php was associated with text files(!) so I have re-associated *.php with php files.

Thanks again.

0

Please sign in to leave a comment.