I have a PHP script that I am using to generate some rather complicated javascript for a web application. It is necessary that this script be generated by PHP for scalability reasons.
Here is my problem:
if I name the file
myscript.js
, then I have to use htaccess to tell the webserver to pipe this through PHP (not preferrable)if I name the file
myscript.php
, then Zend Studio will highlight all the code as HTML instead of javascript.
What I am doing now is simply naming the script myscript.php
, and wrapping all the code in <script>
tags, then doing include('myscript.php')
instead of the preferred: <script src='myscript.php'>
.
I could thwart this whole problem if only I could tell Zend Studio to highlight this file as though it were a *.js
file. Is there a way of accomplishing this?
Currently I am using versions 5.5 (for Windows, at work) and 6.1 (for Linux, at home).