I've opened a directory, and I'm trying to read a text file, but I can't get it to read:
$subFolders = opendir($dir); $myfile = "info.txt"; $fh = fopen($myFile, 'r'); $theData = fread($fh, 5); fclose($fh); echo $theData;
The directory I've opened does contain the info.txt file I'm looking for. I'm able to view it if I list the contents of the folder. Why can't I read it? The above code returns no output.