Foros del Web » Programando para Internet » PHP »

haberiguar full path del hostin ?

Estas en el tema de haberiguar full path del hostin ? en el foro de PHP en Foros del Web. Hola, tengo un problema hace tiempo estoy intentando descubrir el path y al subir el archivo me da error alguien sabe algun codigo para ver ...
  #1 (permalink)  
Antiguo 17/06/2008, 15:30
Avatar de hawaiian050  
Fecha de Ingreso: junio-2007
Mensajes: 285
Antigüedad: 16 años, 10 meses
Puntos: 2
haberiguar full path del hostin ?

Hola,

tengo un problema hace tiempo estoy intentando descubrir el path y al subir el archivo me da error alguien sabe algun codigo para ver el fullpath ?

buen muchas gracias

un saludo.
  #2 (permalink)  
Antiguo 17/06/2008, 15:34
Avatar de pateketrueke
Modernizr
 
Fecha de Ingreso: abril-2008
Ubicación: Mexihco-Tenochtitlan
Mensajes: 26.399
Antigüedad: 16 años
Puntos: 2534
Respuesta: haberiguar full path del hostin ?

mmm, puedes usar...

Código PHP:
$aqui dirname(__FILE__); 
siendo $aqui la ruta actual del script en ejecución... igual y sirve!
__________________
Y U NO RTFM? щ(ºдºщ)

No atiendo por MP nada que no sea personal.
  #3 (permalink)  
Antiguo 17/06/2008, 15:42
Avatar de hawaiian050  
Fecha de Ingreso: junio-2007
Mensajes: 285
Antigüedad: 16 años, 10 meses
Puntos: 2
Respuesta: haberiguar full path del hostin ?

me dio la ruta normal, pero no el full path sera otra cosa ? pongo los errores es un simple script para subir archivos:

/home/www/wtauruguay.com
Notice: Undefined variable: HTTP_POST_FILES in /home/www/wtauruguay.com/upl2.php on line 27

Notice: Undefined variable: HTTP_POST_FILES in /home/www/wtauruguay.com/upl2.php on line 28

Notice: Undefined variable: HTTP_POST_FILES in /home/www/wtauruguay.com/upl2.php on line 29

Notice: Undefined offset: 1 in /home/www/wtauruguay.com/upl2.php on line 34

Notice: Undefined offset: 1 in /home/www/wtauruguay.com/upl2.php on line 34

Notice: Undefined offset: 1 in /home/www/wtauruguay.com/upl2.php on line 34

Notice: Undefined variable: HTTP_POST_FILES in /home/www/wtauruguay.com/upl2.php on line 39
Error al subir el archivo
  #4 (permalink)  
Antiguo 17/06/2008, 16:32
Avatar de GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 17 años, 10 meses
Puntos: 2135
Respuesta: haberiguar full path del hostin ?

Prueba usar $_FILES en lugar de $HTTP_POST_FILES.

Saludos.
  #5 (permalink)  
Antiguo 17/06/2008, 16:34
 
Fecha de Ingreso: marzo-2008
Mensajes: 306
Antigüedad: 16 años
Puntos: 6
Respuesta: haberiguar full path del hostin ?

No sé en PHP, pero en PERL lo puedes averiguar (sin h y con v) del siguiente modo:

Código:
#!/usr/bin/perl
print `pwd`
Tambien pueds consultar la variable de entorno: SCRIPT_FILENAME

Me imagino que en PHP se podrá hacer algo similar.
__________________
Pop & Rock Bands
Pop Music Stars
  #6 (permalink)  
Antiguo 17/06/2008, 16:51
Avatar de hawaiian050  
Fecha de Ingreso: junio-2007
Mensajes: 285
Antigüedad: 16 años, 10 meses
Puntos: 2
Respuesta: haberiguar full path del hostin ?

Hola GatorV,

Hera eso tal cual $_FILE , y hacer el form mas liviano por las duas.

P.D mira este post :D http://www.forosdelweb.com/f13/funci...cadena-128182/ creo seria buen aporte xD osea un code tan profeccional como el que usa el de forosdelweb.com :) .. seria bueno , o alguno que funcione 80% o 90% por lo menos.

Saludos
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 00:27.