Attached is code when testing, the variable filename is interpreted as yedot.png and file date reflects the correct last mod date; filenamea however seems to be interpreted correctly but filedatea returns an error.\
Can anyone help?
<?php
$myFile = "testFile.txt";
$fh = fopen($myFile, 'w') or die("can't open file");
$stringData = "yedot.png\n";
fwrite($fh, $stringData);
$stringData = "rrrrrrrr\n";
fwrite($fh, $stringData);
fclose($fh);
$fh = fopen($myFile, 'r');
$theData[1] = fgets($fh);
$theData[2] = fgets($fh);
$filename = "yedot.png";
$filedate = date ("m.d.Y ", filemtime($filename));
echo "Filename: ".$filename. "File date: ".$filedate."<br>";
$filenamea = $theData[1];
$filedatea = date ("m.d.Y ", filemtime($filenamea));
echo "FilenameA: ".$filenamea."FiledataA: ".$filedatea."<br>";
fclose($fh);
echo $theData[1];
echo $theData[2];
?>