The filemtime () isn't working for my script, but is working fine for the script where I copied the example code
The filemtime () isn't working for my script, but is working fine for the script where I copied the example code I have a .txt file located under some folder of my data files. Now I have created a long polling system ( actually copied the code ) which is run by ajax. Now the problem is that my php script is unable to fetch file modification time of the text file (it totally disregards the file). Below I have both the original code of the author and my twerked code. The one of the author worked fine, but not mine. Plz help. The apache server is hosted on windows server THe file path is absolutly correct and file exist. Here's the section of my code which has error while (true) { //**The error occurs here** $fileModifyTime = filectime($file); if ($fileModifyTime === false) { throw new Exception('Could not read last modification time'); } // if the last modification time of the file is greater than the last update sent to the browser... ...