Witam.
Potrzebuję skryptu, dzięki któremu przez przeglądarkę może wrzucić plik na serwer.
Znalazłem coś takiego:
<?
function upload_file($input_name, $path)
{
global $HTTP_POST_FILES;
if(isset($HTTP_POST_FILES) && is_uploaded_file($HTTP_POST_FILES[$input_name]["tmp_name"]))
{
$file_name = $HTTP_POST_FILES[$input_name]["name"];
//For those who have policies about the file types that can be uploaded
//to their sites, $file_name can be modified to disable unwanted behaviour
//like the serving of unwanted content.
move_uploaded_file($HTTP_POST_FILES[$input_name]["tmp_name"],
$path . "/" . $file_name);
//I do this because some servers will set the permissions on uploaded files
//to 0600 or 0700. That makes recently uploaded images unviewable.
chmod($path . $file_name, 0644);
}
}
?>
Nie wiem jak utworzyć do tego formularz. Proszę o pomoc. Pozdrawiam.