exists'; $sizeLimit = 150000000; $path = $_SERVER['PHP_SELF']; if (substr($path, -4) == '.php') $path = dirname($path); $site = 'http://'.$_SERVER['SERVER_NAME'].$path; if (substr($site, -1) != '/') $site = $site.'/'; ?> $sizeLimit) { $message = 'Plik musi być mniejszy niż '.($sizeLimit/1000000).'MB !'; } else { $file = $folder.'/'.$_FILES['file']['name']; $i = 1; while(file_exists($file)) { $i++; $parts = explode('.',$_FILES['file']['name']); if (count($parts) == 1) $name = $_FILES['file']['name'].' ('.$i.')'; else { $parts[count($parts)-2] .= ' ('.$i.')'; $name = implode('.', $parts); } $file = $folder.'/'.$name; } move_uploaded_file($_FILES['file']['tmp_name'],$file); $message = 'Dziękujemy za przekazanie pliku!'; } } } if (isset($_GET['wyloguj'])) { session_destroy(); header('Location: '.$site); } ?> Dostarczanie pliku do <?php print_r( $_SERVER['SERVER_NAME']); ?>

Dostarczanie pliku do