How can the issue of "Maximale Ausführungszeit erreicht - Script wurde abgebrochen" be addressed when transferring a large file using PHP?

The issue "Maximale Ausführungszeit erreicht - Script wurde abgebrochen" occurs when the maximum execution time limit is reached while transferring a large file using PHP. To address this issue, you can increase the maximum execution time limit in the PHP configuration or use the set_time_limit() function within your script to extend the execution time.

// Increase the maximum execution time limit to 300 seconds
ini_set('max_execution_time', 300);

// Or use set_time_limit() function within your script
set_time_limit(300);

// Code for transferring the large file goes here