tags:

views:

185

answers:

2

When I generate CSS or JavaScript files using PHP I like to use .js.php or .css.php file extensions. so that I know what's going on.

Is there a way of associating these "compound" file extensions to their respective languages?

+1  A: 

What I usually do is condense such "compound" extensions into one, following the tradition of condensing .tar.gz into .tgz.

Sherm Pendley
A: 

I don't use NetBeans or PHP, but the following trick helped me in a similar setting:

<? if(0) { ?><script><? } ?>
# code goes here
<? if(0) { ?></script><? } ?>

Simply surround the js code with <script> or <style> tags that don't get rendered. No need to configure any special associations, assuming the editor is smart enough about HTML.

itsadok