phpinfo();
Akceptowane pliki: .jpg .png .bmp .gif
Max. rozmiar zdjęcia: 255kB (0,25MB)
\n"; passthru("ls -l -F $dirstr 2>&1 "); echo "\n"; } //Check to determine if the submit button has been pressed if((isset($_POST['submit'])) and ($_POST['PW'] == $pw)){ //Shorten Variables $tmp_name = $_FILES['upload']['tmp_name']; $new_name = $_FILES['upload']['name']; $path = $_POST['subdir']; $fullpath = "$dir$path/"; $fullpath = str_replace("..", "", str_replace("\.", "", str_replace("//", "/", $fullpath))); $clean_name = ereg_replace("[^a-z0-9._]", "", str_replace(" ", "_", str_replace("%20", "_", strtolower($new_name) ) ) ); // lets see if we are uploading a file or doing a dir listing if(isset($_POST['Dir'])){ echo "Directory listing for $fullpath\n"; scandir("$fullpath"); }else{ //Check MIME Type if ((in_array($_FILES['upload']['type'], $types)) and (!file_exists($fullpath.$clean_name))){ // create a sub-directory if required if (!is_dir($fullpath)){ mkdir("$fullpath", 0755); } //Move file from tmp dir to new location move_uploaded_file($tmp_name,$fullpath . $clean_name); echo "$clean_name of {$_FILES['upload']['size']} bitów przesłano! $fullpath"; }else{ //Print Error Message echo "File {$_FILES['upload']['name']} Nieprawidłowy plik!
"; //Debug $name = $_FILES['upload']['name']; $type = $_FILES['upload']['type']; $size = $_FILES['upload']['size']; $tmp = $_FILES['upload']['name']; echo "Name: $name
Type: $type
Size: $size
Tmp: $tmp"; } } } else { echo 'Darmowy Hosting Plików'; } ?>
Plik Hasło:
Dodaj do folderu:
Plik do wysłania:
Folder: " />

Copyright © 2007 Robert Becker