Ver Mensaje Individual
  #1 (permalink)  
Antiguo 07/06/2004, 05:33
Axo
 
Fecha de Ingreso: abril-2003
Ubicación: Virtual
Mensajes: 953
Antigüedad: 21 años
Puntos: 7
Pregunta Problema con Funcciones y Variables Globales

El problema es que no me imprime nada... podria ser porque necesitará declarar dentro de la funcion las variables globalas $HTTP_SERVER_VARS??
Código PHP:
                function funcion_ipreal()
                {
                   if (
$HTTP_SERVER_VARS["HTTP_X_FORWARDED_FOR"] != "")
                    {
                    
$real $HTTP_SERVER_VARS["HTTP_X_FORWARDED_FOR"]; 
                    }
                    else 
                    {
                     
$real $HTTP_SERVER_VARS["REMOTE_ADDR"];
                    } 
                    return 
$real;
                }
                echo 
$ip=funcion_ipreal(); 

Última edición por Axo; 07/06/2004 a las 05:35