Re: [PHP-ES] Problema a partir de la actualizacion de PHP
[email protected] (Alejandro Tesone)
| Newsgroups | php.general.es |
|---|---|
| Message-ID | <[email protected]> |
Solucion PERFECTA!!!!! 2010/11/16 Juan Pablo Berdejo <[email protected]>: > > > 2010/11/15 Alejandro Tesone <[email protected]> >> >> Mi sitio funcionaba perfecto hasta la actualizacion por parte del >> administrador del PHP a 5.2 >> Ahora no registra las variables. >> Todo recae en este segmento del sitio. >> Alguien tiene idea de la posible solucion? >> >> Gracias, >> >> Alejandro >> >> <? >> // FUNCION PARA EVITAR EL REGISTER_GLOBALS = OFF ---> >> function process_array ($arr_vars, $method) { >> >> GLOBAL $HTTP_GET_VARS, $HTTP_POST_VARS, $_SESSION; > > Cambiar $HTTP_GET_VARS por $_GET > Cambiar $HTTP_POST_VARS por $_POST > >> >> // reset($arr_vars); >> for ($x=0; $x<count($arr_vars);$x++) { >> >> $key = key($arr_vars); >> if ($key != ""){ >> $str_to_eval = "GLOBAL \$" . $key . ";"; >> if ($method=="POST" || $method=="GET") { >> $str_to_eval.= "\$" . $key . "=\$HTTP_" . $method . >> "_VARS[\"" . > > Cambiar $HTTP_ por $_ > Quitar _VARS > >> >> $key . "\"];"; >> } else { >> $str_to_eval.= "\$" . $key . "=\$_SESSION[\"" . >> $key . "\"];"; >> //echo $str_to_eval." - ".$_SESSION[$key]."<BR>"; >> } >> //echo "-->" . $str_to_eval . "<--" ; >> eval ($str_to_eval);} >> next($arr_vars); >> } >> >> >> }; >> >> ?> >> >> -- >> PHP Spanish Localization Talk Mailing List (http://www.php.net/) >> To unsubscribe, visit: http://www.php.net/unsub.php >> > > > > -- > Salu2, > > Juan Pablo Berdejo Casas, M.D. > GNU/Linux Registred User #131315 > http://es.openoffice.org > http://www.getfirefox.com > http://www.obtengalinux.org > > "No te tomes tan en serio la vida, al fin y al cabo no saldrás vivo de ella" >