chcem vlozit na server (localhost) subor cez hidden, a nechce mi to poslat naozaj netusim co s tym je
<?php
$uploaddir = 'uploads/'; // Relative path under webroot
$uploadfile = $uploaddir . basename($_FILES['userfile']['name']);
if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) {
echo "File is valid, and was successfully uploaded.\n";
}
else {
echo "File uploading failed.\n";
}
?>
kod je to z w3c ale ani ten mi nefunguje, takze fakt netusim co stym je, nakoniec mi napise ze failed