[thelist] parse file.js with PHP

Means, Eric D eric.d.means at boeing.com
Thu Jun 27 09:07:01 CDT 2002


>  -----Original Message-----
> From: 	PeterV [mailto:peter at poorbuthappy.com]
> Sent:	Thursday, June 27, 2002 5:46 AM
> To:	thelist at lists.evolt.org
> Subject:	[thelist] parse file.js with PHP
>
> Hi all,
> I need to parse a file.js file with PHP. Should I:
> - call it file.php? (easiest, but can I do that?)
> - change the settings in an .htaccess file? (how was that again? what did
I
> need to add to the virtual domain in the .config file?)
> - change the settings in the .config file (Apache server) will be harder
> because I have a clueless Apache sysadmin whose hand I need to hold to do
> this stuff (but he won't let me do it) and he's in another country.

Calling it file.php is probably a bad idea, because some browsers may want
it to be served as text/javascript or whatever, which could cause issues.

Changing the server config is probably also a bad idea, because I would
assume most .js files won't need PHP parsing - so parsing them would be
inefficient.

I'd go with an htaccess mod.  I'm not familiar with the syntax, but Google
should be able to help.



More information about the thelist mailing list