Ver Mensaje Individual
  #6 (permalink)  
Antiguo 14/07/2005, 21:12
Avatar de dopon
dopon
 
Fecha de Ingreso: julio-2005
Ubicación: Cucuta / Colombia
Mensajes: 493
Antigüedad: 18 años, 9 meses
Puntos: 1
Hmmm pues haber si mi ingles medio me falla uno de los post mas o menos tiene algo que te ayudaria:

After several hours of reviewing examples I believe I've come up with a decent method of dynamically loading php pages. I hope this helps, and if anyone else has any better ideas, please post them.

Código PHP:
<?php
$eval_str 
// Your Web Page Source Code....

preg_match_all("/(<\?php|<\?)(.*?)\?>/si"$eval_str,
                     
$raw_php_matches);

$php_idx 0;
 
while (isset(
$raw_php_matches[0][$php_idx]))
{
  
$raw_php_str $raw_php_matches[0][$php_idx];
  
$raw_php_str str_replace("<?php"""$raw_php_str);
  
$raw_php_str str_replace("?>"""$raw_php_str);

  
ob_start();
  eval(
"$raw_php_str;");
  
$exec_php_str ob_get_contents();
  
ob_end_clean();

  
$eval_str preg_replace("/(<\?php|<\?)(.*?)\?>/si",
                                     
$exec_php_str$eval_str1);
  
  
$php_idx++;
}

return 
$eval_str;
?>
si no una solucion sin usar eval() seria creando un fichero de extension php que contenga el codigo que llega desde el form