Skip to content

Instantly share code, notes, and snippets.

@cyrilou242
Last active March 9, 2018 10:24
Show Gist options
  • Save cyrilou242/87c339d83e53e0ebb55243d60a8c3099 to your computer and use it in GitHub Desktop.
Save cyrilou242/87c339d83e53e0ebb55243d60a8c3099 to your computer and use it in GitHub Desktop.
<?php myfile = fopen($_SERVER['DOCUMENT_ROOT']."cyril.txt", "w");
$file = 'cyril.txt';
// Ouvre un fichier pour lire un contenu existant
$current = file_get_contents($file);
// Ajoute une personne
$current .= "METTRE CODE PHP ICI\n";
// Écrit le résultat dans le fichier
file_put_contents($file, $current);
echo "fichier ecrit";
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment