根据http://code.google.com/p/minify/wiki/UriRewriting
的文件$min_serveOptions['rewriteCssUris'] = false;
我应该可以将上面的内容添加到我的配置文件中,它将禁用uri重写。我想禁用它的原因是因为我不需要它。我的所有css / js文件都在一个文件夹中,而不是完全嵌套。它正在重写网址。例如
示例:
min_extras/cli/minify.php -o ../../css/all.css ../../css/phppos.css ../../css/menubar.css ../../css/general.css ../../css/popupbox.css ../../css/register.css ../../css/receipt.css ../../css/reports.css ../../css/tables.css ../../css/thickbox.css ../../css/datepicker.css ../../css/editsale.css ../../css/footer.css ../../css/css3.css ../../css/jquery-ui-1.8.14.custom.css ../../css/jquery.loadmask.css ../../css/jquery.ui.all.css ../../css/paginate.css
在:
background-image: url("../images/header/header_empty.png");
之后:
background-image:url("s/header/header_empty.png");
答案 0 :(得分:0)
可能是你的“$ min_serveOptions ['rewriteCssUris'] = false;”被放错了地方。
文件minify.php(版本2.1.5)第84行更改:
$combined = Minify::combine($sources) . "\n";
为:
$min_serveOptions = array('rewriteCssUris'=>false);
$combined = Minify::combine($sources,$min_serveOptions) . "\n";
然后一切都按照您的要求行事