How do I associate ".js.php" with JavaScript syntax in NetBeans IDE 6.5?

When I create CSS or JavaScript files using PHP, I like to use the .js.php or .css.php extensions. so I know what's going on.

Is there a way to associate these "compound" file extensions with their respective languages?

+1


source to share


2 answers


I am not using NetBeans or PHP, but the following trick helped me with a similar setup:

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

      



Just surround the js code with <script>

or tags <style>

that are not displayed. You don't need to set up any special associations, assuming the editor is smart enough about HTML.

+7


source


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



+1


source







All Articles