![]()
![]()
![]()
mancano davvero solo più le testate!
in locale funziona tutto perfettamente...
sul server del mio provider no!
sto cercando di scrivere il contenuto di un form (solo un campo
di testo per prova!) in un file di testo sul mio sito, peccato che mi esca sempre l'errore della funzione fopen, chi mi risolve questo
problema mi risparmia le testate vere!!! GRAZIE
Melvis
<html>
<body>
<?php
if (isset($_POST['saying'])) {
if (!$file = fopen('prova.txt', 'wb')) {
echo 'Errorissimissimooooo';
} else {
if (fwrite($file, $_POST['saying'])) {
echo 'Saying added to file!';
} else {
echo 'An error occurred whilst adding the saying.';
}
fclose($file);
}
}
?>
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
Saying:
<textarea name="saying"></textarea>
<input type="submit" name="submit" value="Insert">
</form>
</body>
</html>