Jump to content

Create Css File in PHP


irperera

Recommended Posts

I'm creating a menu that uses css and mysql database. I have everything working, expect the fact that i need to go in manual and change or add css styles. what i would like to do is find out how to make php create a css file and input style where needed. can someone point me into the correct direction?

irperera
Link to comment
Share on other sites

You could set the href of you css in the link tag to a php script which would output css.

OR

you could use php to edit the css file. To do this you will need file_get_contents and file_put contents (or the fopen fread fput fclose equivalnet) and to develop a method of finding the relevant lines in the css....
Link to comment
Share on other sites

  • 2 weeks later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.