What potential issues or errors can arise when attempting to upload files larger than 3 MB using PHP?

When attempting to upload files larger than 3 MB using PHP, you may encounter issues related to the server's maximum upload file size limit. This can result in the file not being uploaded successfully or only partially uploaded. To solve this issue, you can increase the upload_max_filesize and post_max_size directives in your php.ini configuration file to accommodate larger file uploads.

// Set maximum upload file size in php.ini
ini_set('upload_max_filesize', '10M');
ini_set('post_max_size', '10M');