How can error reporting be enabled in PHP to troubleshoot file upload issues?

To troubleshoot file upload issues in PHP, error reporting can be enabled by setting the error_reporting directive to E_ALL in the php.ini file or using the error_reporting function within the PHP script. This will display any errors or warnings related to file uploads, helping to identify and resolve any issues.

// Enable error reporting for file upload issues
error_reporting(E_ALL);