Empty $_FILES array with PHP file upload Posted on 2023-01-03 [Tuesday] by Jay Jay Reply Wow. I just spent a few hours debugging a problem with my PHP file upload. Turns out the fix was to include an ‘id’ attribute on the file input element. Have no idea why that is required or works, but it does.