par
AB » 23 oct. 2010, 18:53
Au plus simple je ferais
if (isset($_POST['text']))
{
$tab_lignes = explode("\r\n",$_POST['text']);
if (file_put_contents('test_ficher.txt',implode("\n", $tab_lignes))) echo 'contenu écrit dans test_ficher.txt';
}
?>
<form action = "#" method = "post"/>
<textarea name="text"></textarea>
<input type = "submit" value = "ok"/>
</form>
Au plus simple je ferais
[php]if (isset($_POST['text']))
{
$tab_lignes = explode("\r\n",$_POST['text']);
if (file_put_contents('test_ficher.txt',implode("\n", $tab_lignes))) echo 'contenu écrit dans test_ficher.txt';
}
?>
<form action = "#" method = "post"/>
<textarea name="text"></textarea>
<input type = "submit" value = "ok"/>
</form>[/php]