Are there any known issues or inconsistencies with PHP file upload handling in different browsers?

One common issue with PHP file upload handling in different browsers is that the file type and file size restrictions may not be consistent across all browsers. To solve this issue, you can use server-side validation to check the file type and size before processing the upload.

if ($_FILES['file']['type'] == 'image/jpeg' && $_FILES['file']['size'] < 5000000) {
    move_uploaded_file($_FILES['file']['tmp_name'], 'uploads/' . $_FILES['file']['name']);
    echo 'File uploaded successfully!';
} else {
    echo 'Invalid file type or size.';
}