Dynamic CSS - Syntax highlighting |
Site Admin
|
Are you using PhpED for Linux or Windows?
Is it 4.6 or an earlier version? what's particular version&build number? |
||||||||||||
|
|
Im using 4.6 (4621) on windows. |
||||||||||||||
|
Site Admin
|
I have good news for you
PHP embedded into CSS and JAVASCRIPT files (by default .css and .js) is supported in PHPED 4.6.1 and it will be released soon. |
||||||||||||
|
|
Great, thanks alot! |
||||||||||||||
|
|
Siema, how do you get the PHP to be parsed in CSS files? Do you give them names like styles.php, or do you have your server set to send .css files to the PHP interpreter? I've often wondering what the most effecient and reliable way of doing this is.
|
||||||||||||
|
Guru master
|
Quboid as he indicated the file is named style.css.php, so it's being parsed automatically.
You could add the CSS option to the php-extensions in your webserver config as well if you wanted to have a CSS extension, but i'm not really sure if that is a good idea. |
||||||||||||
|
Site Admin
|
it does not really matters if you store your css files in .css.php or just .php files or add .css to the list of extensions to be processed by php.
Results will be the same. What really matters is content type. Indeed, your css files must generate Content-Type: text/css header. By default Apache does it for you and Apache's decision is based on the mime-type table lookup with file extension. In case if css file is processed by PHP, it's php will assign Content-Type and by default it is text/html. This is okay for html output, but is not okay for css or js. To get the proper results, you need
|
||||||||||||||
|
|
By saving them as .php files, like dmitri says. |
||||||||||||||
|
Dynamic CSS - Syntax highlighting |
|
||
Content © NuSphere Corp., PHP IDE team
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by