Im having problems reading text files in a php loop. This is an easier example of my code and I know I should check to see it the file exists that is in my longer version but no matter what I do this won/t read my text files. The PHP warnings say that the text files are empty but they aren’t. The PHP is writting the <br /> tho.
for ($i=1; $i<=5; $i++)
{
$myFile = "$i.txt";
$readfile = file_get_contents($myfile);
echo "$readfile <br />";
}
Your passing
$myfileinfile_get_contentsbut it’s called$myFileabove (case sensitive)