Ver Mensaje Individual
  #2 (permalink)  
Antiguo 13/02/2012, 01:05
Avatar de repara2
repara2
 
Fecha de Ingreso: septiembre-2010
Ubicación: München
Mensajes: 2.445
Antigüedad: 13 años, 7 meses
Puntos: 331
Respuesta: Agregar Variable a function

Dentro de la función la variable no está definida:

Código PHP:
Ver original
  1. $direct ="".$reg['c_path']."";//  
  2. function loadPics($pics)
  3.  
  4. {
  5.     if ($dir = @opendir("$direct/"))
  6.     {

Código PHP:
Ver original
  1. $direct ="".$reg['c_path']."";//  
  2. function loadPics($pics)
  3.  
  4. {
  5.    global $direct;
  6.     if ($dir = @opendir("$direct/"))
  7.     {
__________________
Fere libenter homines, id quod volunt, credunt.