我正在玩這個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 /)
我不想將任何外部資源更改爲絕對路徑。有沒有解決這個問題的方法?有沒有更好的方法來處理這種情況?