I am tryig to read an entire file in PHP, but I have this issue with filesize function. Here is the code:
<?php
$file = fopen("file.txt", "r");
echo $file;
$fsize = filesize($file);
//$ftext = fread($file, $fsize);
//echo $ftext;
?>
The parameter should be the string of the path of the file, not the file itself.
Try this: $fsize = filesize("file.txt");