if(isset($_GET['actionid']) && isset($_GET['profileid']))
{
$actionid = $_GET['actionid'];
$profileid = $_GET['profileid'];
$res = $database->news_poll($profileid,$actionid);
$k = 0;
while(!$NROW =$res->fetch_array())
{
usleep('50000000');
$res = $database->news_poll($profileid,$actionid);
}
$action = actiontype_encode($NROW,'0',$json,$encode,$database);
$data['action'] = $action;
echo json_encode($data);
}
이것은 새 데이터 서버를 폴링하기위한 스크립트입니다. 하지만 작동하는 브라우저는 내 사이트에서만 작동하지 않습니다. 문제는 특정 브라우저가 새 데이터를 구독 할 때 연결이 열려 있으므로 동일한 서버에 대한 추가 요청을 브라우저에서 만들 수 없다는 것입니다. 어떤 문제가 있다면 설명해주십시오.긴 폴링을 구현할 수 없습니다.
긴 폴링을 구현해야합니다. 매우 중요하며 짧은 폴링이 아닌 긴 폴링을 사용하여이를 해체해야합니다. 제발 도와주세요. 구현 실제 문제를 지적하십시오. –