Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [php] Niedzialajacy upload plikow
vip3r
post
Post #1





Grupa: Zarejestrowani
Postów: 162
Pomógł: 0
Dołączył: 28.11.2006
Skąd: 2322

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


Ja mam cos tutaj ale nie wiem czy to chodzi. To jest skrypt uploud.
  1. <?php
  2.  
  3. $archive_dir = "./zdjecia"; // katalog z uploadem
  4. global $userfile, $userfile_name, $userfile_size, $userfile_type, $archive_dir, $WINDIR;
  5. if(isset($WINDIR)) $userfile = str_replace("","", $userfile);
  6. $filename = basename($userfile_name);
  7. if($userfile_size <= 0){("Brak pliku!");exit;}
  8. if(!@copy($userfile, "$archive_dir/$filename")) die ("Nie mogę skopiować $userfile_name na $filename");
  9. if(!isset($WINDIR) && !@unlink($userfile)) die ("Nie mogę skasować $userfile_name");
  10. echo "Dodałem: <B>$filename</B><BR>";
  11.  
  12. ?>


Ten post edytował vip3r 17.12.2006, 16:35:49
Go to the top of the page
+Quote Post

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 Aktualny czas: 21.08.2025 - 17:30