<? $nombre="file2"; Header("Content-Type: text/plain"); Header("Content-Disposition: attachment; filename=$nombre.txt"); echo "HOLA A TODOS\r\n"; echo "Es una Prueba\r\n"; ?>