相关疑难解决方法(0)

PHP sleep()无效

我正在制作一个php文件,它将在五分钟后运行一个事件.从文档来看,似乎等待五分钟只需要sleep(300),但这不起作用.我已经测试了所有其他代码,它工作正常,直到我添加该sleep行.

<?php
/**
 * Twitter App
 * bagelBack.php
 * Takes parameters from $_POST and creates a tweet
 * RKoutnik, 2012
 * Code originally found on http://140dev.com/twitter-api-programming-tutorials/hello-twitter-oauth-php/
 */

$name = '@'.$_POST['twitterName'];
$type =  $_POST['bagelType'];

/* BEGIN CONTENT SPINNER TO IMPRESS LYNK */
$bagels = array(
    0 => "bagel",
    1 => "breakfast treat",
    2 => "doughy food-type item",
    3 => "round yeast-raised munchie",
    4 => "doughnut-shaped roll",
    5 => "hard-crusted treat"
);
$finished = array(
    0 => "finished …
Run Code Online (Sandbox Code Playgroud)

php sleep

6
推荐指数
1
解决办法
1万
查看次数

标签 统计

php ×1

sleep ×1