Ver Mensaje Individual
  #1 (permalink)  
Antiguo 20/10/2010, 14:44
Avatar de mayid
mayid
Colaborador
 
Fecha de Ingreso: marzo-2009
Ubicación: BsAs
Mensajes: 4.014
Antigüedad: 15 años, 1 mes
Puntos: 101
Exclamación Problema con { en try catch

Acabo de subir una web y tengo un problema que no se cual sea. Me da error en la llave del try catch:
Código PHP:
Ver original
  1. try
  2.         {
  3.              $img = PhpThumbFactory::create($temporal, $options);
  4.              $thumb = PhpThumbFactory::create($temporal, $options);
  5.         }
  6.         catch (Exception $e)
  7.         {
  8.              $error = die('<h3>Error escalando la imagen.</h3>');
  9.         }

Código PHP:
Ver original
  1. Parse error: parse error, unexpected '{' in /var/www/vhost/estudiodigital.es/home/html/ingreso/libreria/controladores/componentes/fotos.php on line 38

Si quito los try catch , el script sigue adelante pero me da error en este objeto:

Código PHP:
Ver original
  1. if ($thumb->adaptiveResize( ANCHO_FOTO , ALTO_FOTO )->save(PERFILES.$nuevo_nombre))
  2.             return $nuevo_nombre;

Código PHP:
Ver original
  1. Parse error: parse error, unexpected T_OBJECT_OPERATOR in /var/www/vhost/estudiodigital.es/home/html/ingreso/libreria/controladores/componentes/fotos.php on line 48


Sera un problema de versiones de PHP? En el servidor dicen que tienen PHP5.