Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]Parse error: syntax error
Gman
post
Post #1





Grupa: Zarejestrowani
Postów: 7
Pomógł: 0
Dołączył: 29.06.2013

Ostrzeżenie: (0%)
-----


Błąd: Parse error: syntax error, unexpected '$image' (T_VARIABLE) on line 5

  1. else if ( ini_get( "allow_url_fopen" ) == 1 )
  2. {
  3. if ( !copy( $thumbnail_link, $upload_path.$thumb_name ) )
  4. {
  5. list( $img_width, $img_height, $img_type, $img_attr ) = image $image = "";
  6. switch ( $img_type )
  7. {
  8. case 1 :
  9. $image = imagecreatefromgif( $thumbnail_link );
  10. $ext = ".gif";
  11. break;
  12. case 2 :
  13. $image = imagecreatefromjpeg( $thumbnail_link );
  14. $ext = ".jpg";
  15. break;
  16. case 3 :
  17. $image = imagecreatefrompng( $thumbnail_link );
  18. $ext = ".png";
  19. }
  20. $resource = @imagecreatetruecolor( $img_width, $img_height );
  21. if ( function_exists( "imageantialias" ) )
  22. {
  23. @imageantialias( $resource, true );
  24. }
  25. @imagecopyresampled( $resource, $image, 0, 0, 0, 0, $img_width, $img_height, $img_width, $img_height );
  26. @imagedestroy( $image );
  27. }
  28. $thumb_name = $video_uniq_id."-1".$ext;
  29. $img_type = 2;
  30. default :
  31. switch ( $img_type )
  32. {
  33. case 1 :
  34. @imagegif( $resource, $upload_path.$thumb_name );
  35. break;
  36. case 2 :
  37. @imagejpeg( $resource, $upload_path.$thumb_name );
  38. break;
  39. case 3 :
  40. }
  41. @imagepng( $resource, $upload_path.$thumb_name );
  42. break;
  43. if ( $resource === "" )
  44. {
  45. $error = 1;
  46. }
  47. }
  48. return $upload_path.$thumb_name;
  49.  
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 5.10.2025 - 20:18