diff options
Diffstat (limited to 'templates/index.php')
-rwxr-xr-x | templates/index.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/templates/index.php b/templates/index.php index a6375bd..b3e1d8f 100755 --- a/templates/index.php +++ b/templates/index.php @@ -9,8 +9,12 @@ if(strpos($root,"http://") === 0 && !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS } $file = file_get_contents($currentpath."index.html"); // -$file = str_replace("href=\"","href=\"".$root."/CarnetElectron/",$file); +$file = preg_replace_callback('/<link(.*?)href=\"(.*?\.css(?:\?.*?)?)"/s',function ($matches) { + global $currentpath; + return "<link".$matches[1]."href=\"".$matches[2]."?mtime=".filemtime($currentpath.$matches[2])."\""; +}, $file); +$file = str_replace("href=\"","href=\"".$root."/CarnetElectron/",$file); $file = preg_replace_callback('/<script(.*?)src=\"(.*?\.js(?:\?.*?)?)"/s',function ($matches) { global $currentpath; |