Re: Create programable CSS

From: Date: Fri, 25 Apr 2003 01:52:23 +0000
Subject: Re: Create programable CSS
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-145215@lists.php.net to get a copy of this message
This may not be the best way, but sometimes I like to set it up so that I have a directory called '_js' in my project folder containing .js files. Only, they're not quite javascript files. I added .js to apache's list of php extensions and just put any php commands right in the JS. Then, instead of using <SCRIPT LANGUAGE="javascript" SRC="whatever.js"> I use... <? include("_js/whatever.js"); ?> the javascript will of course still show up in the html source, but this still allows me to seperate the two while i'm developing. just make sure if you do this, the JS files you include start and end with <SCRIPT> and </SCRIPT> -jake "David Otton" <phpmail@jawbone.freeserve.co.uk> wrote in message news:tqsgavo2ncqt5euprvluritc0pv2psk2c5@4ax.com... > On Thu, 24 Apr 2003 17:04:36 -0500, you wrote: > > >Is there a way to create dynamic CSS pages and/or JS pages using php? > > Either run your .js and .css files through the PHP interpreter (how to > do it depends on your web server, but in Apache look at the AddType > directive), or simply rename your *.css file to *.php (untested, but it > should work). >

« previous php.general (#145215) next »