[thelist] External Javascript files + PHP

rudy r937 at interlog.com
Thu Oct 25 00:03:31 CDT 2001


> I can't seem to get a external javascript file, linked via the
> src="foobar.php" attribute of a <script> tag, to work

maybe you'll just have to make sure it has the .js extension

of course, that's your problem, right?  then php won't process it?

if this were SSI's you could set the .htaccess file to process files with
extensions other than .shtml -- can't you do something similar for php,
make it process files with the .js extension?

> the external file has a few <?php blah blah blah ?> lines in it which I'm
> using to populate a javascript array with data from a MySQL table.

why not stick just those few lines inline?


rudy





More information about the thelist mailing list