[eluser]TheLoops[/eluser]
[quote author="Maxximus" date="1210296123"]Well to be honest I just read this part:
Code:
foreach ($matches['urls'] as $old_url) {
$old_url = trim($old_url,'"\'');
if (strlen($old_url[1]) > 7 && strcasecmp(substr($old_url[1], 0, 7), 'http://') == 0) {
$new_url = $old_url;
} else {
$new_url = dirname($css_path).'/'.$old_url;
}
$urls[$old_url] = relative_path_to(str_replace(dirname(FCPATH),'',trim($this->cache_dir_css)).'/', $new_url);
}
It seems to always do the relative_path_to function. Tried it with a relative_path_to function found on the net.
You were pretty quick with your reaction
, just to make sure you see it: pls add header("Content-type: text/css"); to the generated CSS when using .php extension.[/quote]
The code checks the path for a leading "http://". If it finds one, then the path is kept untouched. Else, it considers it relative and tries to re-link it.
Regarding the http header: The header refused to be added to the output due to a small bug. Check my first post for the updated v1.0.1 (at Google Code Project)