Page 1 of 1

php update website graphic

Posted: Tue Nov 17, 2009 3:43 am
by nga
hello guys, i uses php encode as css file (header('Content-type: text/css');) to allow admin to manage the look of the website (some main color, logo etc). However, the site's speed seem to decrease since it needs extra work to check the design preferences in the database (i assume so because it seems faster before and it doesnt have that much graphic...). Is there anyway to write the setting to a file (xml?) and have the php file to read from it rather than keep checking the database?

What's faster and what are the choices i have here?

Re: php update website graphic

Posted: Tue Nov 17, 2009 3:45 am
by iankent
The fastest way would be to write the CSS content to a .css file when its changed by admins, and then link to the 'static' CSS file from your HTML code.

You could save the info as XML but you'd still need to retrieve and parse the XML every time the CSS file is loaded.