Whenever I run a script twice at the same time, it's as if the second instance simply outputs what the first did. The second instance also does not detect any files the first one made etc.
First instance started at 14:37:59 outputs:
Started at: 2012-04-12 14:37:59
OK
Second instance started at 14:38:03 outputs:
Started at: 2012-04-12 14:37:59
OK
What gives?
<?php
function Weblog_debug($input)
{
echo $input."<br/>";
}
$curtime = time();
$startedat = date('Y-m-d',$curtime) . "\t" . date('H:i:s', $curtime) . "\t";
Weblog_debug("Started at: $startedat");
$timediff = time() - $curtime;
while($timediff < 5)
{
$timediff = time() - $curtime;
}
Weblog_debug("OK");
?>