Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $nombre_temp="archivo_tmp.txt";
- $nombre_orig="archivo.txt";
- $nombre_new="archivo_new.txt";
- $cadena_nueva="prueba de linea 0004\r\n";
- $gestor = fopen($nombre_temp, "w");
- //fseek($gestor, 0, SEEK_SET); //Mueve el puntero al principio del fichero
- fwrite($gestor, $cadena_nueva);
- fclose($gestor);
- $comando="cat $nombre_temp $nombre_orig > $nombre_new";
- $comando="copy $nombre_temp+$nombre_orig $nombre_new";
- exec($comando);
- ?>
Add Comment
Please, Sign In to add comment