I am trying to fix this part of the code as I am getting an error like this:
Warning: filemtime(): stat failed for /var/www/vhosts/example.tk/httpdocs/manager/css/general.css in /var/www/vhosts/example.tk/httpdocs/js-and-css.inc.php on line 49
function addStyleCssHtml($arr_css){
$css_files=implode('|', $arr_css);
$file_hash=sha1($css_files);
$dest_path=$_SERVER['DOCUMENT_ROOT'].'/css/static-'.$file_hash.'.css';
$recreate=!file_exists($dest_path);
if (!$recreate) {
$last_updated=filemtime($dest_path);
foreach ($arr_css as $fl){
$temp_path=(substr($fl, 0, 1)=='/')?$_SERVER['DOCUMENT_ROOT'] . $fl:realpath($fl);
if (!file_exists($temp_path)) $temp_path=$_SERVER['DOCUMENT_ROOT'].'/'.$fl;
$time = filemtime($temp_path);
if ($time > $last_updated) {
$recreate=true;
break;
}
The line 49 is : $time = filemtime($temp_path);
I think this is something related to the path.