Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $arquivo_origem = "client.php";
- $arquivo_destino = "copiado.php";
- if (copy($arquivo_origem, $arquivo_destino)){
- echo "Sucesso!";
- }
- $handle = fopen( $arquivo_destino, 'a+' );
- $file = $arquivo_destino;
- $line_looking = 16; //lembre que a contagem começa em 0
- $lines = file($file, FILE_IGNORE_NEW_LINES);
- $lines[$line_looking] = 'Linha substituida';
- file_put_contents($file, implode("\n", $lines));
- // Fecha o arquivo
- fclose($handle);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement