Ver Mensaje Individual
  #1 (permalink)  
Antiguo 15/05/2012, 05:42
Avatar de syntex
syntex
 
Fecha de Ingreso: noviembre-2002
Ubicación: Cataluña
Mensajes: 978
Antigüedad: 21 años, 6 meses
Puntos: 4
Problemas con new SimpleXMLElement(file_get_contents($ruta), NULL, false)

Hola muy buenas,

Tengo este script:

if ($sxe = new SimpleXMLElement(file_get_contents($ruta_PartNumbe r), NULL, false))
{
if ($sxe->{'files.index'}->file['HighPic'])
{
$value = $sxe->{'files.index'}->file['HighPic'];
subir_fotos($value,$id_articulos,$name_file=$id_ar ticulos,$acceso='rar');
}

return;

}

Y me tira este error:

Warning: file_get_contents(http://[email protected]/xml_s3/xml_se...output=metaxml) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 500 Internal Server Error in /usr/home/xxxxx/xxxxx.es/web/ini_articulos.php on line 70

Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML' in /usr/home/xxxxxx/xxxxx.es/web/ini_articulos.php:70 Stack trace: #0 /usr/home/xxxxxx/xxxxx.es/web/ini_articulos.php(70): SimpleXMLElement->__construct('', 0, false) #1 /usr/home/xxxxxx/xxxxx.es/web/ini_articulos.php(643): imagenes('CN047AE', 'HP', '1694', 'TINHPA01318') #2 {main} thrown in /usr/home/xxxxxx/xxxxx.es/web/ini_articulos.php on line 70

Ya que quiero evitar que me salga el mensaje del warning y continue con el script y no puedo, e incluido:

Código PHP:
ini_set("error_reporting",0);
ini_set("display_errors",0); 
__________________
------------------------------------------------
La paciencia es el rey de la ciencia
------------------------------------------------