simple ... hace esto ...
Código PHP:
<?
header("Content-Description: File Transfer");
header("Content-Type: application/force-download");
header("Content-Disposition: attachment; filename=NOMBRE DE TU ARCHIVO.doc o .rtf");
echo "Esto seria el contenido de tu documento .doc o .rtf";
$i = 0;
while($i < 10){
echo "la variable i tiene el valor : ".$i;
$i++;
}
//a modo de ejemplo !!!saludos!!!
?>