$archivo = "ruta_MI_ARCHIVO.txt";$contenido = "TU_TEXTO_AQUI";$f = fopen ($archivo, 'w');fputs ($f, $contenido);fclose ($f);