Ciao a tutti! Scusate se magari creo un post che esiste già, però preferivo postarvi la mia pagina php direttamente.
Ho creato una pagina php che esporta il contenuto di una textarea in un file .txt
Il problema è che sia con il charset UTF-8 che ISO-8895-1 mi risultano al posto delle lettere accentate dei caratteri assurdi.
Vi posto il codice di ipad_one.php
------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>iPad_Sender_One</title>
</head>
<body>
<?php
$saving = $_REQUEST['saving'];
if ($saving == 1){
$data = $_POST['suggerimento'];
$file = "ipad_one.txt";
$fp = fopen($file, "w+");
fwrite($fp, $data);
fclose($fp);
}
?>
<form action="ipad_one.php?saving=1" method="post" name="ipad1" id="ipad1">
<textarea name="suggerimento" rows="10" id="suggerimento">
</textarea>
<input type="submit" value="Invia Suggerimento">
<input type="reset" value="Cancella" />
</form>
</body>
</html>
-----
Se nella textarea inserisco "à è ì ò ù"
ottengo "à è ì ò ù"
Grazie mille!![]()