Good day, I discovered the problem. My code makes an entry in the database values ​​of the function date ("H: i: s") ;. The script itself has a body

ignore_user_abort(1); set_time_limit(0); while(true) { //Тут запись date("H:i:s") } 

So, all the time the date () value is the same, explain how to fix it ?. I even did differently. For the sake of the file_get_contents () test file with the date, but the result is the same ... although the file itself, the contents of which I parsed, displays everything fine. Please help!

  • And "all the time" is how much? Here is your code slightly modified, only with a delay of a second: prntscr.com/bcyi4r . - Gino Pane
  • Strange, it's just that the trouble is when I stop the script and start it up - everything is fine, but after it starts using the old time - Corle
  • I do not understand a bit why you need so many identical time records. Given the speed of computers, in a second you will have several thousand identical times, in the next second new ones will go. Maybe it makes sense to try a delayed script? - Gino Pane
  • No, well, I figuratively unsubscribed. Naturally, there is another code, but the problem is that this code works on the timing recorded in the database, and the timing is incorrectly recorded because it is used all the time the same time - Corle
  • one
    So still, if you insert a delay, then maybe this will help? I mean, maybe you just did not notice that time has changed? In my case, your code gives out about 5 thousand identical records, this is how much time it takes in a second, then the next second comes. Here is an example: prntscr.com/bcypn5 . Do my examples work for you too? - Gino Pane

0