Injecting PHP code in HTML files

If I have a file called foo.inc with some <?php .. ?> code in it, the php injection(?) engine kicks in and php code editing works just fine.

However if I have some <?php ... ?> code within a file called foo.htm then it isn't treated at php code.

This particular project has some php code nestled into files like foo.htm - the .htm files are included MVC style so the code gets run.

I've had a quick play with the "language injection" settings but no luck there, does anybody know how to do this?

1 comment

PHP is not an injectable language at all, its a templating language with its own file type.
Use Settings|File types to map htm extension to PHP file type.

0

Please sign in to leave a comment.