title: How to get PDF or DOC file size?
body: <p>Trying to get a pdf document file size, but it is giving me <code>Warning: filesize(): stat failed for</code>... </p>
  
  <p>What I have tried: </p>
  
  <pre><code>    //get original temporary name
      $temp_name = $_FILES['userDegreeFile']['tmp_name'];
  
      //original file path with original name
      $inital_name = $_SERVER['DOCUMENT_ROOT'] . "super/IMG/user_files/user_files_".$userFirstName."_".$user_id."/" . $temp_name; 
  
      //get the file size
      $file_size = filesize($inital_name);
  </code></pre>
  
  <p>When running this I get the error stated above. The file name in the error is <code>D:/Programs/wamp/www/super/IMG/user_files/user_files_Jim_52/D:\Programs\wamp\tmp\php70B9.tmp</code></p>
  
  <p>What am I doing wrong?</p>