首先,我试图使用https://pngquant.org/压缩png图像,但我不知道如何在Apache服务器(Windows)上下载它。浏览器遇到一个错误,pngquant未安装在服务器(xampp)上。我怎么做?在apache服务器上安装pngquant,并在命令行中使用它
其次,我必须这样做:
$command = "find . -name '*.png' -exec pngquant --ext .png --force 256 {} \;";
shell_exec($command);
这个代码在这里https://pngquant.org/php.html后?
我从来没有在PHP中使用过命令行。谢谢。
改进的格式。 –