Ver Mensaje Individual
  #1 (permalink)  
Antiguo 15/11/2009, 20:40
Avatar de xalupeao
xalupeao
 
Fecha de Ingreso: mayo-2008
Ubicación: Santiago, Chile
Mensajes: 749
Antigüedad: 16 años
Puntos: 12
Duda con function()

Les dejo mi duda amigos.

- tengo un archivo config.php y hay dentro tengo, ej:

Código PHP:
 $ip "xxx.xxx.xxx.xxx"//IP de ejemplo 
- tambien tengo otro archivo que se llama funciones.php y tiene esto, ej:

Código PHP:
function VerEJ($puerto){
$ip_port=$ip.':'.$puerto;
return 
$ip_port;

- bueno tengo un archivo ver_ip_port.php, ej:

Código PHP:
$ver_ip VerEJ(1111);
print 
$ver_ip
-----------------
Pregunta
-----------------

¿Porque solo obtengo como salida ":1111" y no "xxx.xxx.xxx.xxx:1111"?

¿Que tengo que hacer para que la funcion tomo la variable $ip desde el archivo config.php"?