Ver Mensaje Individual
  #4 (permalink)  
Antiguo 20/09/2011, 08:05
paskuini
 
Fecha de Ingreso: junio-2009
Mensajes: 156
Antigüedad: 14 años, 10 meses
Puntos: 7
Respuesta: Cargar datos externos desde fichero txt

Cita:
Iniciado por paskuini Ver Mensaje
Y un documento html así:
Código 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>Documento sin título</title>
</
head>

<
body>
<
script>
document.write(varTitulo);
document.write(varDuracion);
document.write(varAutor);
document.write(varProta);
document.write(varSinopsis);
document.write(varFoto1);
document.write(varFoto2);
</script>
</body>
</html> 
o así:
Código 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>Documento sin título</title>
</
head>

<
body>
<
script>
document.getElementById(Titulo).appendChild(varTitulo)
document.getElementById(Duracion).appendChild(varDuracion)
document.getElementById(Autor).appendChild(varAutor)
document.getElementById(Prota).appendChild(varProta)
document.getElementById(Sinopsis).appendChild(varSinopsis)
document.getElementById(Foto1).appendChild(varFoto1)
document.getElementById(Foto2).appendChild(varFoto2)
</script>
</body>
</html>