UNIVERSIDAD TECNOLÓGICA DEL ESTADO DE ZACATECAS
UNIDAD ACADÉMICA DE PINOS
TECNOLOGÍAS DE LA INFORMACIÓN Y COMUNICACIÓN
Materia
DESARROLLO DE APLICACIONES II
Tema
MANEJO DE ARCHIVOS
Nombre completo del Alumno:Enrique Reyes Correa, Sergio Santoyo Molina.
Grado: 4 Grupo: B
Nombre del Docente: I.EN Tic Eloy contreras Delira
Fecha de entrega : 07 de Octubre 2013
UNIVERSIDAD TECNOLÓGICA DEL ESTADO DE ZACATECAS
UNIDAD ACADÉMICA DE PINOS
TECNOLOGÍAS DE LA INFORMACIÓN Y COMUNICACIÓN
Escribir.php
<?php
$text=$_REQUEST ['textarea'];
$fp=fopen("instruccion.txt","a");
fputs ($fp, $text);
echo "$linea</br>";
fclose($fp);
?>
<script>
location.href="leer.php";
</script>
Leer.php
<?php
$fp=fopen("instruccion.txt","r");
while (!feof ($fp)){
$linea=fgets($fp);
echo "$linea<br/>";
}
fclose ($fp);
?>
Formulario.html
<!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>
UNIVERSIDAD TECNOLÓGICA DEL ESTADO DE ZACATECAS
UNIDAD ACADÉMICA DE PINOS
TECNOLOGÍAS DE LA INFORMACIÓN Y COMUNICACIÓN
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Documento sin t&iacute;tulo</title>
</head>
<body>
<form id="form1" name="form1" method="post" action="Escribir.php">
<label>
<textarea name="textarea"></textarea>
</label>
<label>
<input type="submit" name="Submit" value="escribir" />
</label>
</form>
</body>
</html>
Interfaz del formulario

Codigo (kique)

  • 1.
    UNIVERSIDAD TECNOLÓGICA DELESTADO DE ZACATECAS UNIDAD ACADÉMICA DE PINOS TECNOLOGÍAS DE LA INFORMACIÓN Y COMUNICACIÓN Materia DESARROLLO DE APLICACIONES II Tema MANEJO DE ARCHIVOS Nombre completo del Alumno:Enrique Reyes Correa, Sergio Santoyo Molina. Grado: 4 Grupo: B Nombre del Docente: I.EN Tic Eloy contreras Delira Fecha de entrega : 07 de Octubre 2013
  • 2.
    UNIVERSIDAD TECNOLÓGICA DELESTADO DE ZACATECAS UNIDAD ACADÉMICA DE PINOS TECNOLOGÍAS DE LA INFORMACIÓN Y COMUNICACIÓN Escribir.php <?php $text=$_REQUEST ['textarea']; $fp=fopen("instruccion.txt","a"); fputs ($fp, $text); echo "$linea</br>"; fclose($fp); ?> <script> location.href="leer.php"; </script> Leer.php <?php $fp=fopen("instruccion.txt","r"); while (!feof ($fp)){ $linea=fgets($fp); echo "$linea<br/>"; } fclose ($fp); ?> Formulario.html <!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>
  • 3.
    UNIVERSIDAD TECNOLÓGICA DELESTADO DE ZACATECAS UNIDAD ACADÉMICA DE PINOS TECNOLOGÍAS DE LA INFORMACIÓN Y COMUNICACIÓN <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Documento sin t&iacute;tulo</title> </head> <body> <form id="form1" name="form1" method="post" action="Escribir.php"> <label> <textarea name="textarea"></textarea> </label> <label> <input type="submit" name="Submit" value="escribir" /> </label> </form> </body> </html> Interfaz del formulario