com sleep o processador não vai vazer mais nada vai ficar "esperando" então então não dá pra vc simular isso com sleep()
para aquelas janelinhas iguais as do hotmail enquanto tá anexando um arquivo vc faz assim:
<?php
echo"
<head>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">
<title>Untitled Document</title>
</head>
<script language=\"javascript\">
function messageWindow(title, msg)
{
var width=\"300\", height=\"125\";
var left = (screen.width/2) - width/2;
var top = (screen.height/2) - height/2;
var styleStr = 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+',top='+top+',screenX='+left+',screenY='+top;
msgWindow = window.open(\"\",\"msgWindow\", styleStr);
var head = '<head><title>'+title+'</title></head>';
var body = '<center>'+msg+'<br><p>';
msgWindow.document.write(head + body);
}
messageWindow('Janela de Processo', 'Processo em andamento<br>Aguarde');
</script>
<body>
Teste....";
?>
<?php
//faz o q tem q fazerr...
/// aqui....
//e depois
echo "<script language=\"javascript\">msgWindow.close();</script>";
?>
</body>
Blz?