Zápis do súboru

PHP

<?php
$filename = fopen('test.txt', 'w');
fwrite($filename, 'tento retazec je zapisany do suboru test.txt');
fclose($filename);
?>

Teória

Perl

$file_path = “test.txt“;
open($file, “>“ . $file_path)
print $file “tento retazec je zapisany do suboru test.txt\n“;
close($file);

Teória

Python

subor = open("ahoj.txt","a")

subor.write("Táto veta je zapísaná do súboru ahoj.txt na jeho koniec.")
subor.close()

Teória