I have a css style under php to execute some functions and sql connections, because the client needs to update a database everyday in the morning and change some css style too, so the problem is that a css with php is too slow so I need that whenever the sql database is modify the style.php creates a new static version of style.css , and the same must happend with all the pages that do sql requests. In the end is a cache I guess, where all dinamycs pages get converted to开发者_如何学Python a static version everytime the database it's updated. And the clients will only visit the static versions of the pages. How can I do that??. Bye!
Write out your CSS to a static file with fwrite
:
http://www.php.net/fwrite
Plenty of examples on the PHP site and other information to read
To clarify ... you say you provide a dynamic CSS from a PHP file ... it makes more sense if this isn't a good solution for you, to write out the CSS to a static CSS file
精彩评论