php how to test if file has been uploaded completely

后端 未结 11 1540
耶瑟儿~
耶瑟儿~ 2021-02-01 15:24

Is there any way to check if file has been uploaded completely on the server? My scenario: User uploads file over ftp and my other PHP task is running in cronjob. Now I would li

11条回答
  •  孤独总比滥情好
    2021-02-01 16:16

    Check for the file after uploading by next code

    if (file_exists('http://www.domain.com/images/'.$filename)) :
    
        // Write some response as you like as a success message
    
    endif;
    

    Notice: you have to change images path by yours ,

    good luck :)

提交回复
热议问题