consider this is my directory and has multiple .txt file $Directory = './downloads';
I want to store the content of last modified file in the directory to a variable or something like that. that I can use somewhere else as a txt file
$Directory = './testlog'; $downloads = scandir($Directory , 1); $reportFile = $filesInTestLog [0] ; $finalReportFile = $reportFile . '.txt';
but it just pick the name of the file not the content`