title: filesize() expects parameter 1 to be a valid path - PHP
body: <p>I am tryig to read an entire file in PHP, but I have this issue with filesize function. Here is the code:</p>
  
  <pre><code>&lt;?php
   $file = fopen("file.txt", "r");
   echo $file;
  
   $fsize = filesize($file);
   //$ftext = fread($file, $fsize);
   //echo $ftext;
  ?&gt;
  </code></pre>