How can the maximum file upload size be adjusted in the php.ini file to prevent errors during FTP uploads in PHP?

To adjust the maximum file upload size in the php.ini file, you can modify the "upload_max_filesize" and "post_max_size" directives. Increasing these values will allow larger files to be uploaded via FTP in PHP without encountering errors.

// Adjust maximum file upload size in php.ini
ini_set('upload_max_filesize', '20M');
ini_set('post_max_size', '25M');