Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Probolem z uploadem fotek
Hpsi
post 2.12.2005, 11:29:05
Post #1





Grupa: Zarejestrowani
Postów: 483
Pomógł: 50
Dołączył: 15.03.2005
Skąd: Poznań

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


Mam problem w czasie uploadu fotek pokazuje mi sie następujacy bład

Kod
Warning: imagejpeg(): Unable to access avat/avat_1133519528.jpeg in /home/hpsi/public_html/enigme/class/upload.php on line 38


Myslalem z początku myslalem ze to bład w uprawniniach (ale są na 777) w katalogu. Wiec teraz juz nie mam pojęcia o co może chodzić

oto kod
  1. <?php
  2.  
  3. function zdjecie($im_file_name, $new_path, $width, $height)
  4. {
  5. $image_attribs = getimagesize($im_file_name);
  6. $im_old = imageCreateFromJpeg($im_file_name);
  7. $th_max_width = $width;
  8. $th_max_height = $height;
  9. if($image_attribs[0]>=$image_attribs[1])
  10. {
  11. @$ratio = ($width >= $height) ? $th_max_width/$image_attribs[0] : $th_max_height/$image_attribs[1];
  12. }
  13. else
  14. {
  15. @$ratio = ($width < $height) ? $th_max_width/$image_attribs[0] : $th_max_height/$image_attribs[1];
  16. }
  17. $th_width = $image_attribs[0] * $ratio;
  18. $th_height = $image_attribs[1] * $ratio;
  19. $im_new = imagecreatetruecolor($th_width,$th_height);
  20. $th_file_name = substr($im_file_name, 0, strlen($im_file_name)-4) . '.thumb';
  21. imageCopyResampled($im_new,$im_old,0,0,0,0,$th_width,$th_height, $image_attribs[0], $image_attribs[1]);
  22. imageJpeg($im_new,$new_path,80);
  23. }
  24.  
  25. ?>


--------------------
Daiquiri: T1 = (dx/dt * s)^hpsi
Daiquiri: gdzie T1 - Twój czas przybycia na miejsce, dx/dt - prędkość, s droga
Daiquiri: brb trzeba by to poprawić T1 - Czas jaki Ci to zajmie
Daiquiri: Zatem T - czas dotarcia p T1 + T2 gdzie T2 = aktualny czas

===
po prostu kocham ją :D haha
Go to the top of the page
+Quote Post

Posty w temacie


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

 



RSS Wersja Lo-Fi Aktualny czas: 18.07.2025 - 02:02