Open lowpez opened 6 years ago
@lowpez
@ashucg ,
Hello mate, can you share with me an example code of how to use it? I got this for my html
function sanitize_output($buffer) {
require_once ("phpwee-php-minifier/phpwee.php");
return PHPWee\Minify::html($buffer);
}
But how apply this in a specific *.css file?
Hi, I actually could use an example as well.
I tried a simple thing:
require_once("res/min/phpwee.php");
$css = file_get_contents("res/css/responsive.css");
var_dump($css);
$minified_css = PHPWee\Minify::css($css);
var_dump($minified_css);
the last line gives string(0) "" vs. the first dump which outputs the actual CSS.
Everything else (HTML, JS) works.
Thank you.
Hi @deep42 - I would no longer suggest using this minifier. You should use some of the newer minifiers that are frequently updated and are compatible with latest changes in CSS, JS and PHP worlds. For starters, you can use Minify, I have not used it personally, but it looks good.
Thanks for the tip, I'll check it out.
Hello guys, Thank you for taking the time to pay attention and help me to solve these questions. This is the code i'm using for minify my html:
1º How can I minimize directly on these tags? . An example code i'll be great.
2º it possible to merge style1.css and style2.css in a single file/call? Greetings!