Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: Probolem z uploadem fotek
Forum PHP.pl > Forum > Przedszkole
Hpsi
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. ?>
dtb
Unable to access - brak dostepu. hmmm...

sprawdz pliki .htaccess czy nie ma tam wzmianki o tym pliku/folderze
Hpsi
oto plik htaccess
Kod
RewriteEngine On
RewriteRule ^[^\.]+$ index.php?$0&%{QUERY_STRING} [L]
RewriteCond %{REQUEST_FILENAME} !-F
RewriteRule ^.*$ index.php?$0&%{QUERY_STRING} [L]
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.