Php mysql to do task after 30 seconds

前端 未结 2 735
无人共我
无人共我 2021-01-29 13:05

How can I get a mysql query command to execute after 30 seconds of visiting a php site?

相关标签:
2条回答
  • 2021-01-29 13:38

    you could put your mysql query into another page and then with your current one, set the header: refresh to that page. Would that be suitable for what you are looking for?

    <?php
    header("refresh:30;url=\"http://www.yourdomain.com/mysqlquery.php");
    ?>
    

    Put this at the very top of your page before any html is sent to the browser.

    0 讨论(0)
  • 2021-01-29 13:39

    You can make AJAX request for a php script which executes your mysql query, use timer in js.

    0 讨论(0)
提交回复
热议问题