FTP를 통해 웹 서버에 많은 양의 이미지를 보냅니다. 문제는 내가 마지막으로받은 이미지를 사용자에게 보여주고 있지만 마지막 이미지가 완전히 전송되지 않는 경우입니다. 그렇다면 이미지가 사용자에게 표시되기 전에 완전히 전송되었는지 어떻게 확인할 수 있습니까?이미지가 완전히 전송되었는지 어떻게 알 수 있습니까?
$directory = dir($path);
while (false !== ($entry = $directory->read())) {
$filepath = "{$path}/{$entry}";
// could do also other checks than just checking whether the entry is a file
$imageFormats = array(IMAGETYPE_JPEG);
if (is_file($filepath) && filectime($filepath) > $latest_ctime)
{
if(in_array(exif_imagetype($filepath), $imageFormats) && $imageResource = imagecreatefromjpeg($filepath))
{
$latest_filename = $entry;
$latest_ctime = filectime($filepath);
}
}
}
1182 담당자와 함께, 코드를 보지 않고는 도움을 드릴 수 없습니다. 우리에게 PHP를 보여 주시겠습니까? –
이제 나에게 @MichaelBerkowski에 답변 할 수 있을까요? – PachinSV