Welcome Guest, Not a member yet? Register   Sign In
Embed PHP in css and js files
#2

[eluser]CroNiX[/eluser]
Never needed to do this. I set all dynamic js vars in the head of my document (which is a php template, so I can use php there), like base_url, so that my separate, pure js files can use them. Same with dynamic css rules.

You can also set your server up to parse js and css files as php and use appropriate headers when sending the data out, although that makes your server have to process more things. There are many guides on the net how to set that up.


Messages In This Thread
Embed PHP in css and js files - by El Forum - 04-23-2012, 09:22 AM
Embed PHP in css and js files - by El Forum - 04-23-2012, 09:29 AM
Embed PHP in css and js files - by El Forum - 04-23-2012, 09:33 AM
Embed PHP in css and js files - by El Forum - 04-23-2012, 10:04 AM
Embed PHP in css and js files - by El Forum - 04-23-2012, 10:07 AM
Embed PHP in css and js files - by El Forum - 04-23-2012, 10:16 AM
Embed PHP in css and js files - by El Forum - 04-23-2012, 10:22 AM
Embed PHP in css and js files - by El Forum - 04-23-2012, 10:25 AM



Theme © iAndrew 2016 - Forum software by © MyBB