UNIVERSIDAD TECNONOLÓ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 :
Silvana Patricia Padilla Palomo
Marycruz Santos Escañero
Grado: 4 Grupo: “B”
Nombre del Docente : Eloy De Lira Contreras
Fecha de entrega : 9/10/2013
UNIVERSIDAD TECNONOLÓ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>
<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" />
UNIVERSIDAD TECNONOLÓGICA DEL ESTADO DE ZACATECAS
UNIDAD ACADÉMICA DE PINOS
TECNOLOGÍAS DE LA INFORMACIÓN Y COMUNICACIÓN
</label>
</form>
</body>
</html>
Formulario.html
Leer.php

Manejo de archivos

  • 1.
    UNIVERSIDAD TECNONOLÓ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 : Silvana Patricia Padilla Palomo Marycruz Santos Escañero Grado: 4 Grupo: “B” Nombre del Docente : Eloy De Lira Contreras Fecha de entrega : 9/10/2013
  • 2.
    UNIVERSIDAD TECNONOLÓ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> <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" />
  • 3.
    UNIVERSIDAD TECNONOLÓGICA DELESTADO DE ZACATECAS UNIDAD ACADÉMICA DE PINOS TECNOLOGÍAS DE LA INFORMACIÓN Y COMUNICACIÓN </label> </form> </body> </html> Formulario.html Leer.php