PHP Code:
<html>
<head>
<title>Nieuwe pagina 1</title>
</head>
<body>
<?
if ($_POST[action] != 'upit') {
// hier de html voor het formulier
?>
<form name=fileform method=post action=test.php enctype='multipart/form-data'>
<input type='file' name='file'>
<input type="submit" value="Verzenden" name="B1"></p>
<input type='hidden' name='action' value='upit'>
</form>
<?
}
else {
// In PHP versions earlier than 4.1.0, $HTTP_POST_FILES should be used instead
// of $_FILES. In PHP versions earlier than 4.0.3, use copy() and
// is_uploaded_file() instead of move_uploaded_file.
$uploaddir = '/home/test/public_html/img/';
$uploadfile = $uploaddir . $_FILES['userfile']['name'];
print "<pre>";
if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) {
print 'File is valid, and was successfully uploaded.';
print 'Heres some more debugging info:';
print_r($_FILES);
} else {
print "Possible file upload attack! Here's some debugging info";
print_r($_FILES);
}
print "</pre>";
}
?>
</body>
</html>
ik heb me rechten goed gezet (777)
map bestaat maar toch geeft die een fout.
http://test.randyjc.com/test.php
iemand enig idee?