1
I have a PHP function that will show me all the CSS code on front end before HTML. Only the admin can see this CSS code printed on the screen, through the method "include"
.
What I’m trying to figure out is how to copy all this CSS displayed on the screen to a new CSS file.
Taking into account that this Cssque file appears on the screen it contains PHP variables, but on the screen it does not show these variables, but the value of them printed (colors, font size, etc)... or the output code presented by browser.
What I want to avoid is that the admin has to copy all this CSS manually through the screen, and have to paste it into a new CSS file.
So now, I don’t know how to copy this CSS that is on the screen with some specific function for this, either PHP or Javascript. There are about 2000 lines to be copied to a new CSS file.
Can someone give me some light on how I can get this? Since the intended is not a function to copy contents from one file to another, with the method copy, in this case all the PHP code inside the CSS would be copied. What I intend is a way to copy the output code presented by browser already with all CSS values (colors, font sizes, etc).
Copying the result to the clipboard helps?
– Richard Dias
This question seems to me to be formulated with a lot of information that is not part of the problem, if I understand correctly. If I’m not mistaken, your question is actually "how do I save the contents of a variable in a file", fix me if I’m wrong.
– Bacco
I think he wants to take what’s on the screen, the css with the values of the php variables.
– ptkato