내 솔루션은 대부분 작동하지만 대부분은 그렇지 않습니다. 신뢰할 수있는 최상의 솔루션은 무엇입니까?PHP가 새로운 날의 첫 번째 루프를 감지합니다.
<?php
date_default_timezone_set('UTC');
$seconds_today = time() - strtotime('today');
while (true) {
if ($seconds_today > time() - strtotime('today')) {
print('First loop of the new day');
}
$seconds_today = time() - strtotime('today');
sleep(1);
}
?>
당신이 무엇을 이 코드에서 기대 하시겠습니까? –
달성하고자하는 것에 대해 자세히 설명해 주실 수 있습니까? –
"새로운 날의 첫 번째 루프를 감지하십시오"는 의미는 무엇입니까 –