I am currently calling up a large text file from my server. There are thousands of requests for this file per minute. This may seem like a stupid question but I have tried two different ways of calling up this file. One way which uses fopen() , fgets(), and fclose() and the second way which is simply an include() statement. Which is the more efficient or proper way of calling up this file, or does it really make no difference?
$myFile = "directory/".$something.".txt";
$fh = fopen($myFile, 'r');
$theData = fgets($fh);
fclose($fh);
echo $theData = stripslashes($theData);
or this way
include('directory/'.$something.'.txt');