Is there a function similar to setTimeout() (JavaScript) for PHP?

前端 未结 9 1536
离开以前
离开以前 2020-12-06 16:08

The question sort of says it all - is there a function which does the same as the JavaScript function setTimeout() for PHP? I\'ve searched

9条回答
  •  臣服心动
    2020-12-06 16:54

    if you need to make an action after you execute some php code you can do it with an echo

     echo "Success.... ";
    

    so after a time in the client(browser) you can do something else, like a redirect to another php script for example or echo an alert

提交回复
热议问题