Answers for "how to check if file is empty in php"

PHP
2

how to check if file is empty in php

## CHECKS IF FILE IS EMPTY
if ($_FILES['file']['size'] == 0 && $_FILES['file']['error'] == 0)
{
    // file is empty (and not an error)
}
Posted by: Guest on April-07-2022

Code answers related to "how to check if file is empty in php"

Browse Popular Code Answers by Language