<?php
$plantilla = fopen("plantilla.rtf","w+");
$plantilla = addslashes($plantilla);
$plantilla = str_replace('\r','\\r',$plantilla);
$plantilla = str_replace('\t','\\t',$plantilla);
$nombre = "Ludoviko";
$apellido = "Beaumont";
$fecha = date("d-m-Y", time() - 7 * 24 * 60 * 60);
eval( '$rtf = <<<EOF_RTF
' . $plantilla . '
EOF_RTF;
');
$rtf = str_replace('\\\\','\\',$rtf);
fwrite($plantilla,"$apellido-$nombre-$fecha.rtf",$rtf);
?>
Y en el rtf tengo simplemente esto: Este documento muestra el nombre: $nombre y el apellido: $apellido el la fecha: $fecha
el error es:
Warning: fwrite(): supplied argument is not a valid stream resource in /home/shared3/public_html/dimmsel/alejo/plantilla.php on line 20
Agradezco mucho la colaboración
