Are there any best practices or guidelines for handling file uploads in PHP to avoid permission-related errors on Windows servers?

When handling file uploads in PHP on Windows servers, it is important to ensure that the correct permissions are set for the upload directory to avoid permission-related errors. One way to handle this is by explicitly setting the correct permissions for the upload directory using PHP's `chmod` function.

// Set the correct permissions for the upload directory
$uploadDir = 'uploads/';
if (!is_dir($uploadDir)) {
    mkdir($uploadDir, 0777, true);
} else {
    chmod($uploadDir, 0777);
}