How can the "Refresh" header be effectively used in PHP to redirect to a different directory?
To redirect to a different directory using the "Refresh" header in PHP, you can set the header with the desired delay time and new location URL. This will cause the browser to automatically redirect to the specified directory after the specified delay.
<?php
header('Refresh: 5; URL=/new_directory');
exit;
?>