ho necessità di incollare un file già inserito in una variabile in una textarea, ho provato in diversi modi ma la mia scarsa conoscenza del Php non mi ha consentito......
ecco il codice:
<?php /* Created on: 13/06/2006 */ ?>
<?php
$file = $_POST['nomefile'];
$testo =$_POST['areatesto'];
$file = trim($file);
// echo $file;
// echo "
";
// $filetxt = basename($file);
// echo $filetxt;
$fp = fopen($file, "r");
while(!feof($fp))
{
$row = fgets($fp);
// print"$row";
}
echo "
<html>
<head>
<title></title>
</head>
<body>
<div align=\"center\">
<table>
<form action=\" method=\"POST\" enctype=\"multipart/form-data\">
<tr>
<td valign=\"top\">Descrizione </td>
<td><textarea name=\"areatesto\" cols=\"80\" rows=\"10\"></textarea></td>
</tr>
</form>
</table>
</div>
</body>
</html>
";
fclose($fp);
?>