Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [php] Zmiana rozmiaru obrazka
Kethrax
post
Post #1





Grupa: Zarejestrowani
Postów: 80
Pomógł: 3
Dołączył: 9.12.2006
Skąd: Kraków

Ostrzeżenie: (10%)
X----


  1. <?php
  2. if (isset($_FILES['obrazek'])) {
  3. if($_FILES['obrazek']['error'] == UPLOAD_ERR_OK) {
  4.  
  5. $filename = $_FILES['obrazek']['name'];
  6. $filetype = $_FILES['obrazek']['type'];
  7. $filesize = $_FILES['obrazek']['size'];
  8. $filesrc = $_FILES['obrazek']['tmp_name'];
  9.  
  10. echo $_FILES['obrazek']['tmp_name'];
  11.  
  12. if ($filetype == "image/png" || $filetype == "image/x-png" || 
  13. $filetype == "image/gif" || $filetype == "image/jpeg" ||
  14. $filetype == "image/pjpeg") {
  15.  
  16.  
  17.  
  18. move_uploaded_file($filesrc,"../katalog/".$filename);
  19.  
  20. chmod("../katalog/".$filename, 0644);
  21.  
  22. $obr_name = $_FILES['obrazek']['name'];
  23. } else $obr_name = "no_img.jpg";
  24. } else $obr_name = "no_img.jpg";
  25. } else $obr_name = "no_img.jpg";
  26. ?>


Czy jest możliwość zmiany wymiarów obrazka np. na 150x100 px bez użycia GD2 (IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif)
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 - 12:36