podpowiedzcie mi co jest zle z tym skyptem, w ogole nie chce mi robic uploadu:
<?
if ($ile==1) {
print\"<html><head></head>
<body>
<form action=\"upl.php?ile=2\" style=\"display:inline;\" method=\"post\" enctype=\"multipart/form-data\">
<input type=\"hidden\" name=\"form_sent\" value=\"1\">
<br><input name=\"req_file\" type=\"file\"><br>
</center><br><br>
<input type=\"submit\" value=\"dodaj ť\">
</form>
</body></html>\";
} elseif ($ile==2) {
switch ($uploaded_file['error'])
{
case 1: // UPLOAD_ERR_INI_SIZE
case 2: // UPLOAD_ERR_FORM_SIZE
print\"1\";
break;
case 3: // UPLOAD_ERR_PARTIAL
print\"2\";
break;
case 4: // UPLOAD_ERR_NO_FILE
print\"3\";
break;
default:
// No error occured, but was something actually uploaded?
if ($uploaded_file['size'] == 0)
print\"4\";
}
if (isset($_POST['form_sent'])) {
$uploaded_file = $_FILES['req_file'];
{
$allowed_types = array('image/jpeg');
if (!in_array($uploaded_file['type'], $allowed_types)) print\"zły format\";
@chmod('11111111111111.jpg', 0644);
@unlink('11111111111111.gif'); @unlink('11111111111111.png');
}
}
}
?>
zwraca problem "4"...