Esta es la página formulario
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<TITLE> Formulario </TITLE>
<script language="JavaScript">
window.onbeforeunload = confirmExit;
function confirmExit()
{
return "Ha intentado salir de esta pagina. Si ha realizado algun cambio en los campos sin hacer clic en el boton Guardar, los cambios se perderan. Seguro que desea salir de esta pagina? ";
}
var table1_inputs=0;
function myCreateFunction()
{
var table = document.getElementById("myTable");
var row = table.insertRow(2);
var cell2 = row.insertCell(0);
var input1= document.createElement("textarea");
input1.rows="4";
input1.cols="170";
table1_inputs++;
input1.name= 'name1'+table1_inputs;
input1.id = 'id1'+table1_inputs;
var campo4 = document.createElement("input");
campo4.type = "button";
campo4.value = "Borrar";
campo4.onclick = function ()
{
var fila = this.parentNode.parentNode;
var tbody = table.getElementsByTagName("tbody")[0];
tbody.removeChild(fila);
}
cell2.appendChild(input1);
cell2.appendChild(campo4);
}
function vaciar_campo(input1)
{
input1.value = "";
}
var table2_inputs=0;
function myCreateFunction2()
{
var table = document.getElementById("myTable2");
var row = table.insertRow(2);
var cell2 = row.insertCell(0);
var input2 = document.createElement("textarea");
input2.rows="4";
input2.cols="170";
table2_inputs++;
input2.name = 'name2'+table2_inputs;
input2.id = 'id2'+table2_inputs;
var campo4 = document.createElement("input");
campo4.type = "button";
campo4.value = "Borrar";
campo4.onclick = function ()
{
var fila = this.parentNode.parentNode;
var tbody = table.getElementsByTagName("tbody")[0];
tbody.removeChild(fila);
}
cell2.appendChild(input2);
cell2.appendChild(campo4);
}
function vaciar_campo(input2)
{
input2.value = "";
}
var table3_inputs=0;
function myCreateFunction3()
{
var table = document.getElementById("myTable3");
var row = table.insertRow(2);
var cell2 = row.insertCell(0);
var input3 = document.createElement("textarea");
input3.rows="4";
input3.cols="170";
table3_inputs++;
input3.name = 'name3'+table3_inputs;
input3.id = 'id3'+table3_inputs;
var campo4 = document.createElement("input");
campo4.type = "button";
campo4.value = "Borrar";
campo4.onclick = function ()
{
var fila = this.parentNode.parentNode;
var tbody = table.getElementsByTagName("tbody")[0];
tbody.removeChild(fila);
}
cell2.appendChild(input3);
cell2.appendChild(campo4);
}
function vaciar_campo(input3)
{
input.value = "";
}
var table4_inputs=0;
function myCreateFunction4()
{
var table = document.getElementById("myTable4");
var row = table.insertRow(2);
var cell2 = row.insertCell(0);
var input4 = document.createElement("textarea");
input4.rows="4";
input4.cols="170";
table4_inputs++;
input4.name = 'name4'+table4_inputs;
input4.id = 'id4'+table4_inputs;
var campo4 = document.createElement("input");
campo4.type = "button";
campo4.value = "Borrar";
campo4.onclick = function ()
{
var fila = this.parentNode.parentNode;
var tbody = table.getElementsByTagName("tbody")[0];
tbody.removeChild(fila);
}
cell2.appendChild(input4);
cell2.appendChild(campo4);
}
function vaciar_campo(input4)
{
input.value = "";
}
</script>
</HEAD>
<BODY>
<form name="formulario" id="formulario" action="creador.php" method="post" width="30%">
<table id="myTable" border="3" width="100%">
<tr>
<td>
<h1>
Tesis Doctoral
</h1>
</td>
</tr>
<tr>
<td>
<textarea name="Tesis" id="Tesis" rows="4" cols="170"></textarea>
<button onclick="myCreateFunction()" type="button" name="Tesis2" id="Tesis2">
Añadir
</button>
</td>
</tr>
</table>
<table id="myTable2" border="3" width="100%">
<tr>
<td>
<h1>
Subvenciones
</h1>
</td>
</tr>
<tr>
<td>
<textarea name="Subvenciones" id="Subvenciones" rows="4" cols="170"></textarea>
<button onclick="myCreateFunction2()" type="button" name="Subvenciones2" id="Subvenciones2">
Añadir
</button>
</td>
</tr>
</table>
<table id="myTable3" border="3" width="100%">
<tr>
<td>
<h1>
Otra informacion
</h1>
</td>
</tr>
<tr>
<td>
<textarea name="Otrainfo" id="Otrainfo" rows="4" cols="170"></textarea>
<button onclick="myCreateFunction3()" type="button" name="Otrainfo2" id="Otrainfo2">
Añadir
</button>
</td>
</tr>
</table>
<table id="myTable4" border="3" width="100%">
<tr>
<td>
<h1>
Actualidad
</h1>
</td>
</tr>
<tr>
<td>
<textarea name="Actualidad" id="Actualidad" rows="4" cols="170"></textarea>
<button onclick="myCreateFunction4()" type="button" name="actualidad2" id="actualidad2">
Añadir
</button>
</td>
</tr>
</table>
<br>
<br>
<br>
<center>
<input type="submit" value="Enviar">
</center>
</form>
</BODY>
Esta es la página recipiente
<?php
$html = '<html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>"Boletín informativo semanal de la Facultad de Veterinaria, Universidad de Zaragoza"</title>
<link rel=themeData href="BOL%20MODELO_archivos/themedata.thmx">
<link rel=colorSchemeMapping href="BOL%20MODELO_archivos/colorschememapping.xml">
<link rel="stylesheet" type="text/css" href="/css/estilos.css">
<meta http-equiv=X-UA-Compatible content="IE=Edge,chrome=1">
</head>
<body bgcolor=whitesmoke lang=ES link=blue vlink=purple style="tab-interval:35.4pt">
<div class=WordSection1>
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width="100%"
style="width:100.0%;mso-cellspacing:0cm;background:whitesmoke;mso-yfti-tbllook:
1184;mso-padding-alt:0cm 0cm 0cm 0cm">
<tr style="mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes">
<td style="padding:0cm 0cm 0cm 0cm">
<table class=MsoNormalTable border=1 cellspacing=0 cellpadding=0
style="mso-cellspacing:0cm;background:white;border-top:none;border-left:
solid #E7E7E7 1.0pt;border-bottom:none;border-right:solid #E7E7E7 1.0pt;
mso-border-left-alt:solid #E7E7E7 .75pt;mso-border-right-alt:solid #E7E7E7 .75pt;
mso-yfti-tbllook:1184;mso-padding-alt:0cm 7.5pt 0cm 7.5pt">
<tr style="mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes;
height:576.85pt">
<td style="border:none;padding:0cm 7.5pt 0cm 7.5pt;height:576.85pt">
<div style="margin-left:11.25pt;margin-top:30.0pt">
<p class=MsoNormal><span style="mso-fareast-font-family:"Times New Roman";
mso-no-proof:yes"><img width=508 height=139 id="_x0000_i1025"
src="http://veterinaria.unizar.es/sites/veterinaria.unizar.es/files/centros_logos_web-11.png"
alt="http://veterinaria.unizar.es/sites/veterinaria.unizar.es/files/centros_logos_web-11.png"></span><span
style="mso-fareast-font-family:"Times New Roman""><o:p></o:p></span></p>
<p style="margin-top:3.75pt"><span style="font-family:"Arial","sans-serif";
color:#223D71">Boletín informativo semanal de la <strong><span
style="font-family:"Arial","sans-serif"">Facultad de Veterinaria de la
Universidad de Zaragoza</span></strong><o:p></o:p></span></p>
</div>
<table class=MsoNormalTable border=0 cellpadding=0 width="100%"
style="width:100.0%;mso-cellspacing:1.5pt;background:#999999;mso-yfti-tbllook:
1184;mso-padding-alt:0cm 5.4pt 0cm 5.4pt">
<tr style="mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes">
<td style="padding:.75pt .75pt .75pt .75pt">
<p style="margin-top:1.5pt;margin-right:11.25pt;margin-bottom:1.5pt;
margin-left:11.25pt"><span style="font-size:8.5pt;font-family:"Arial","sans-serif";
color:whitesmoke">Está recibiendo este mensaje como miembro de la lista
de distribución ESTUDIANTES/PDI/PAS de la Facultad de Veterinaria de la
Universidad de Zaragoza. Si no ve correctamente este mensaje o bien desea
acceder a BOLETINES ANTERIORES pulse <a
href="http://veterinaria.unizar.es/boletín-0" target="_blank"><span
style="color:#1B1B1B;text-decoration:none;text-underline:none">AQUÍ</span></a><o:p></o:p></span></p>
</td>
</tr>
</table>
<p class=MsoNormal><span style="mso-fareast-font-family:"Times New Roman";
display:none;mso-hide:all"><o:p> </o:p></span></p>
<table class=MsoNormalTable border=1 cellspacing=0 cellpadding=0
width="100%" style="width:100.0%;mso-cellspacing:0cm;border:none;
border-top:solid white 1.5pt;mso-yfti-tbllook:1184;mso-padding-alt:0cm 0cm 0cm 0cm">
<tr style="mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes">
<td style="border:none;padding:0cm 0cm 0cm 0cm">
<table class=MsoNormalTable border=1 cellpadding=0 width="100%"
style="width:100.0%;mso-cellspacing:1.5pt;border:dotted #DADADA 1.0pt;
mso-border-alt:dotted #DADADA .75pt;mso-yfti-tbllook:1184;mso-padding-alt:
0cm 5.4pt 0cm 5.4pt">
<tr style="mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes">
<td style="border:none;padding:.75pt .75pt .75pt .75pt">
<p class=style2 style="margin-top:1.5pt;margin-right:11.25pt;
margin-bottom:1.5pt;margin-left:11.25pt"><strong><span
style="font-family:"Arial","sans-serif"">fecha</span></strong></p>
</td>
<td style="border:none;padding:.75pt .75pt .75pt .75pt">
<p class=style1 style="margin-top:1.5pt;margin-right:11.25pt;
margin-bottom:1.5pt;margin-left:11.25pt"><strong><span
style="font-family:"Arial","sans-serif";color:#C00000">Nº 1045</span></strong></p>
</td>
</tr>
</table>
</td>
</tr>
</table>
<p class=MsoNormal><span style="mso-fareast-font-family:"Times New Roman";
display:none;mso-hide:all"><o:p> </o:p></span></p>
<table class=MsoNormalTable border=1 cellspacing=0 cellpadding=0
width="100%" style="width:100.0%;mso-cellspacing:0cm;border:none;
border-top:solid white 6.0pt;mso-yfti-tbllook:1184;mso-padding-alt:0cm 0cm 0cm 0cm">
<tr style="mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes">
<td style="border:none;padding:0cm 0cm 0cm 0cm">
<table class=MsoNormalTable border=0 cellpadding=0 width="100%"
style="width:100.0%;mso-cellspacing:1.5pt;background:#007E01;mso-yfti-tbllook:
1184;mso-padding-alt:0cm 5.4pt 0cm 5.4pt">
<tr style="mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes">
<td style="padding:.75pt .75pt .75pt .75pt">
<p class=nombre-categoria>TESIS DOCTORAL</p>
</td>
</tr>
</table>
<p class=MsoNormal><span style="mso-fareast-font-family:"Times New Roman";
display:none;mso-hide:all"><o:p> </o:p></span></p>
<table class=MsoNormalTable border=1 cellspacing=0 cellpadding=0
width="100%" style="width:100.0%;mso-cellspacing:0cm;border:none;
border-bottom:dotted #DADADA 1.0pt;mso-border-bottom-alt:dotted #DADADA .75pt;
mso-yfti-tbllook:1184;mso-padding-alt:0cm 0cm 0cm 0cm">
<tr style="mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes">
<td style="border:none;padding:0cm 0cm 0cm 0cm">
<p class=MsoNormal><span style="mso-fareast-font-family:"Times New Roman""><o:p> </o:p></span></p>
<ul style="margin-top:0cm" type=disc>
<li class=MsoNormal style="margin-right:11.35pt;mso-list:l0 level1 lfo1;
tab-stops:list 36.0pt"><span style="font-family:"Arial","sans-serif";
mso-fareast-font-family:"Times New Roman""><?php echo $_POST["Tesis"]; ?></span>
</li>
</ul>
<p class=MsoNormal style="margin-top:0cm;margin-right:11.35pt;
margin-bottom:0cm;margin-left:17.85pt;margin-bottom:.0001pt"><span
style="font-family:"Arial","sans-serif";mso-fareast-font-family:"Times New Roman""><o:p> </o:p></span></p>
<p class=MsoListParagraph><span style="mso-fareast-font-family:"Times New Roman""><o:p> </o:p></span></p>
</td>
</tr>
</table>
<p class=MsoNormal><span style="mso-fareast-font-family:"Times New Roman";
display:none;mso-hide:all"><o:p> </o:p></span></p>
<table class=MsoNormalTable border=1 cellspacing=0 cellpadding=0
width="100%" style="width:100.0%;mso-cellspacing:0cm;border:none;
border-top:solid white 6.0pt;mso-yfti-tbllook:1184;mso-padding-alt:0cm 0cm 0cm 0cm">
<tr style="mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes">
<td style="border:none;padding:0cm 0cm 0cm 0cm">
<table class=MsoNormalTable border=0 cellpadding=0 width="100%"
style="width:100.0%;mso-cellspacing:1.5pt;background:#007E01;
mso-yfti-tbllook:1184;mso-padding-alt:0cm 5.4pt 0cm 5.4pt">
<tr style="mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:
yes">
<td style="padding:.75pt .75pt .75pt .75pt">
<p class=nombre-categoria>SUBVENCIONES / BECAS</p>
</td>
</tr>
</table>
<p class=MsoNormal><span style="mso-fareast-font-family:"Times New Roman";
display:none;mso-hide:all"><o:p> </o:p></span></p>
<table class=MsoNormalTable border=1 cellspacing=0 cellpadding=0
width="100%" style="width:100.0%;mso-cellspacing:0cm;border:none;
border-bottom:dotted #DADADA 1.0pt;mso-border-bottom-alt:dotted #DADADA .75pt;
mso-yfti-tbllook:1184;mso-padding-alt:0cm 0cm 0cm 0cm">
<tr style="mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:
yes">
<td style="border:none;padding:0cm 0cm 0cm 0cm">
<p class=MsoNormal><span style="mso-fareast-font-family:"Times New Roman""><o:p> </o:p></span></p>
//aqui va el segundo texto <----------------------------------------------------------------------------------------
<ul style="margin-top:0cm" type=disc>
<li class=MsoNormal style="margin-right:11.35pt;mso-list:l0 level1 lfo1;
tab-stops:list 36.0pt"><span style="font-family:"Arial","sans-serif";
mso-fareast-font-family:"Times New Roman"">$datos2</span></li>
</ul>
<p class=MsoNormal style="margin-top:0cm;margin-right:11.35pt;
margin-bottom:0cm;margin-left:17.85pt;margin-bottom:.0001pt"><span
style="font-family:"Arial","sans-serif";mso-fareast-font-family:"Times New Roman""><o:p> </o:p></span></p>
<p class=MsoNormal style="margin-top:0cm;margin-right:11.35pt;
margin-bottom:0cm;margin-left:17.85pt;margin-bottom:.0001pt"><span
style="font-family:"Arial","sans-serif";mso-fareast-font-family:"Times New Roman""><o:p> </o:p></span></p>
<p class=MsoListParagraph><span style="font-family:"Arial","sans-serif";
mso-fareast-font-family:"Times New Roman""><o:p> </o:p></span></p>
<p class=MsoNormal style="margin-top:0cm;margin-right:11.35pt;
margin-bottom:0cm;margin-left:17.85pt;margin-bottom:.0001pt"><span
style="mso-fareast-font-family:"Times New Roman""><o:p> </o:p></span></p>
</td>
</tr>
</table>
<p class=MsoNormal><span style="mso-fareast-font-family:"Times New Roman";
display:none;mso-hide:all"><o:p> </o:p></span></p>
<table class=MsoNormalTable border=1 cellspacing=0 cellpadding=0
width="100%" style="width:100.0%;mso-cellspacing:0cm;border:none;
border-top:solid white 6.0pt;mso-yfti-tbllook:1184;mso-padding-alt:
0cm 0cm 0cm 0cm">
<tr style="mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:
yes">
<td style="border:none;padding:0cm 0cm 0cm 0cm">
<table class=MsoNormalTable border=0 cellpadding=0 width="100%"
style="width:100.0%;mso-cellspacing:1.5pt;background:#007E01;
mso-yfti-tbllook:1184;mso-padding-alt:0cm 5.4pt 0cm 5.4pt">
<tr style="mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:
yes">
<td style="padding:.75pt .75pt .75pt .75pt">
<p class=nombre-categoria>OTRAS INFORMACIONES</p>
</td>
</tr>
</table>
<p class=MsoNormal><span style="mso-fareast-font-family:"Times New Roman";
display:none;mso-hide:all"><o:p> </o:p></span></p>
<table class=MsoNormalTable border=1 cellspacing=0 cellpadding=0
width="100%" style="width:100.0%;mso-cellspacing:0cm;border:none;
border-bottom:dotted #DADADA 1.0pt;mso-border-bottom-alt:dotted #DADADA .75pt;
mso-yfti-tbllook:1184;mso-padding-alt:0cm 0cm 0cm 0cm">
<tr style="mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:
yes">
<td style="border:none;padding:0cm 0cm 0cm 0cm">
// aqui va el tercer parrafo <-----------------------------------------------------------------------------
<p class=MsoNormal><span style="mso-fareast-font-family:"Times New Roman""><o:p> </o:p></span></p>
<ul style="margin-top:0cm" type=disc>
<li class=MsoNormal style="margin-right:11.35pt;mso-list:l0 level1 lfo1;
tab-stops:list 36.0pt"><span style="font-family:"Arial","sans-serif";
mso-fareast-font-family:"Times New Roman"">$datos3</span></li>
</ul>
<p class=MsoNormal style="margin-top:0cm;margin-right:11.35pt;
margin-bottom:0cm;margin-left:17.85pt;margin-bottom:.0001pt"><span
style="font-family:"Arial","sans-serif";mso-fareast-font-family:
"Times New Roman""><o:p> </o:p></span></p>
<ul style="margin-top:0cm" type=disc>
<ul style="margin-top:0cm" type=circle>
<li class=MsoNormal style="margin-right:11.35pt;mso-list:l0 level2 lfo1;
tab-stops:list 72.0pt"><span class=SpellE><span
style="font-family:"Arial","sans-serif";mso-fareast-font-family:
"Times New Roman"">$datos4</span></span><span style="font-family:
"Arial","sans-serif";mso-fareast-font-family:"Times New Roman""><o:p></o:p></span></li>
<li class=MsoNormal style="margin-right:11.35pt;mso-list:l0 level2 lfo1;
tab-stops:list 72.0pt"><span style="font-family:"Arial","sans-serif";
mso-fareast-font-family:"Times New Roman"">DSAFDS<o:p></o:p></span></li>
<li class=MsoNormal style="margin-right:11.35pt;mso-list:l0 level2 lfo1;
tab-stops:list 72.0pt"><span style="font-family:"Arial","sans-serif";
mso-fareast-font-family:"Times New Roman"">SFDADSF<o:p></o:p></span></li>
</ul>
</ul>
</td>
</tr>
</table>
<p class=MsoNormal><span style="mso-fareast-font-family:"Times New Roman";
display:none;mso-hide:all"><o:p> </o:p></span></p>
<table class=MsoNormalTable border=1 cellspacing=0 cellpadding=0
width="100%" style="width:100.0%;mso-cellspacing:0cm;border:none;
border-top:solid white 4.5pt;mso-yfti-tbllook:1184;mso-padding-alt:
0cm 0cm 0cm 0cm">
<tr style="mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:
yes">
<td style="border:none;padding:0cm 0cm 0cm 0cm">
<p class=MsoNormal><span style="mso-fareast-font-family:"Times New Roman""> <o:p></o:p></span></p>
</td>
</tr>
</table>
<p class=MsoNormal><span style="font-size:10.0pt;mso-fareast-font-family:
"Times New Roman""><o:p></o:p></span></p>
</td>
</tr>
</table>
<p class=MsoNormal><span style="font-size:10.0pt;mso-fareast-font-family:
"Times New Roman""><o:p></o:p></span></p>
</td>
</tr>
</table>
<p class=MsoNormal><span style="font-size:10.0pt;mso-fareast-font-family:
"Times New Roman""><o:p></o:p></span></p>
</td>
</tr>
</table>
<p class=MsoNormal><span style="font-size:10.0pt;mso-fareast-font-family:
"Times New Roman""><o:p></o:p></span></p>
</td>
</tr>
</table>
</td>
</tr>
</table>
<?php
echo datos1
?>
<p class=MsoNormal><span style="mso-fareast-font-family:"Times New Roman""><o:p> </o:p></span></p>
</div>
</body>
</html>';
file_put_contents('C:\xampp\htdocs\prueba2\Pagfinal.html', $html);
?>
y así es como lo recibo.
pero no me muestra nada
file_put_contents()
de la última línea de tu código estás escribiendo en un archivo (Pagfinal.html) el código que está al inicio de tu recipiente (la variable$html
). Estás escribiendo, nada más. Por eso, veo normal que ese código no muestre nada en pantalla.