Mira este es el código del primer archivo:
pagina1.php Código HTML:
<html>
<head>
<title>Pagina1</title>
</head>
<body>
<form action="ejecuta.php" method="post">
pagina1<br>
<textarea name="comentario" rows="12" cols="80" wrap="off">
<html>
<head>
<title>Problema</title>
</head>
<body>
</body>
</html>
</textarea><br>
<input type="submit" name="enviar" value="Enviar"><br>
<?php require_once('pagina2.php'); ?>
</form>
</body>
</html>
Código del segundo archivo:
pagina2.php Código HTML:
<html>
<head>
<title>Pagina2</title>
</head>
<body>
<form action="ejecuta.php" method="post">
pagina2.php <br>
<textarea name="programa2" rows="12" cols="80" wrap="off">
<html>
<head>
<title>Problema</title>
</head>
<body>
<?php
?>
</body>
</html>
</textarea>
</textarea>
</form>
</body>
</html>
y este es el archivo que procesa al archivo 1:
Código PHP:
<?php
extract($_GET, EXTR_SKIP);
extract($_POST, EXTR_SKIP);
$datos=tempnam("C:/wamp/www/web/crear_fichero/", "");
$ar=fopen($datos,"a") or die("Problemas en la creacion");
fwrite($ar,stripslashes($comentario));
fclose($ar);
eval("include(\"$datos\");");
eval("unlink(\"$datos\");");
?>
¿Cómo hago para que procese el archivo2 incluido en el 2?