I have an endless loop for websockets and one of the task is to check if the file (whose name came through ws message) is already on the server (message is usualy faster the the fileupload). The filename is still the same, so I wanted to check the upload datetime, but whatever i do the file()time is in the loop still the same... I have tried:upload a new file, change datetime on a server even delete the file... no change... not even setting
Any ideas? Thanks
$file_path = "myimg.jpeg";
while (true)
{
unset($file_path); // no effect either
$file_path = "myimg.jpeg"; // no effect either
echo "c:" . filectime($file_path) . " a:". fileatime($file_path) . " m:" . filemtime($file_path) . "\r\n";
}```