title: Warning: filemtime(): stat failed in line 49
body: <p>I am trying to fix this part of the code as I am getting an error like this:</p>
  
  <blockquote>
    <p>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</p>
  </blockquote>
  
  <pre><code> 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 &gt; $last_updated) {
             $recreate=true;
             break;
          } 
  </code></pre>
  
  <p>The line 49 is :    <code>$time = filemtime($temp_path);</code></p>
  
  <p>I think this is something related to the path. </p>