我正在玩这个combine.php file它看起来不错,但我想知道是否有解决我的问题。结合CSS和JS文件+ CSS图像
我现在有我的资源,其外观和工作较少脚本和链接标签,如他们应该
<script type="text/javascript" src="http://path/to/server/javascript/libjs/jqueryui/1.8/development-bundle/ui/minified/jquery.ui.core.min.js,libjs/jqueryui/1.8/development-bundle/ui/minified/jquery.ui.widget.min.js,libjs/jqueryui/1.8/development-bundle/ui/minified/jquery.ui.datepicker.min.js,libjs/plugins/cluetip/1.0.6/jquery.cluetip.js,libjs/plugins/cluetip/1.0.6/lib/jquery.hoverIntent.js,libjs/plugins/cluetip/1.0.6/lib/jquery.bgiframe.min.js"></script>
<link rel="stylesheet" type="text/css" href="http://path/to/server/css/libjs/jqueryui/1.8/development-bundle/themes/base/jquery.ui.core.css,libjs/jqueryui/1.8/development-bundle/themes/base/jquery.ui.theme.css,libjs/jqueryui/1.8/development-bundle/themes/base/jquery.ui.datepicker.css,libjs/plugins/cluetip/1.0.6/jquery.cluetip.css" >
然而,包括在使用相对路径样式表的图像有时不显示 - 它取决于这些样式表即包括顺序:
background: url(images/ui-bg_flat_75_ffffff_40x100.png)
对我和必须处理瓦特/ jqueryui datepicker脚本和一个cluetip脚本携手具体的罪魁祸首。
图像的日期选择具有URL请求这样一个
http://path/to/server/css/libjs/jqueryui/1.8/development-bundle/themes/base/jquery.ui.core.css,libjs/jqueryui/1.8/development-bundle/themes/base/jquery.ui.theme.css,libjs/jqueryui/1.8/development-bundle/themes/base/jquery.ui.datepicker.css,libjs/plugins/cluetip/1.0.6/images/ui-bg_flat_75_ffffff_40x100.png
在图像认为路径是从上包含的脚本(libjs /插件/ cluetip/1.0.6 /),而它实际上是从更早的脚本(libjs/jqueryui/1.8/development-bundle/themes/base /)
我不想将任何外部资源更改为绝对路径。有没有解决这个问题的方法?有没有更好的方法来处理这种情况?