Marek Kilimajer wrote:
The upload form: (There are ofcourse many of of the first three inputs.)Show us the codeAntti wrote:1lt John W. Holmes wrote:Ok now I am able to send the request. I set the post_max_size into 50M
and now when the request is sent the whole apache goes down giving: "The
document containd no data" everytime I send a request. I tried also 10M
but same happens. What the h**l is this?
Do you have this line in your form? <input type="hidden" name="MAX_FILE_SIZE" value="30000"> and is it set to a value greater than the size of all the files you're trying to upload? Some browers actually pay attention to this. ---John Holmes...No, I don't have that line.Try it then... ---John Holmes...No affect. Still gives the "The document contains no data".
<form action='$PHP_SELF' method='POST' enctype='multipart/form-data'>
<input class='form' type='text' size='3' name='tracknum[]' value='$tracks'>
<input class='form' type='text' size='25' name='uartist[]' value='$uartist'>
<input class='form' type='text' size='25' name='usong[]' value=''>
<input type='hidden' name='MAX_FILE_SIZE' value='10000'>
<input type='hidden' name='upload' value='yes'>
<input class='nappi' type='submit' name='submit' value='Upload songs'>
And the php part:
$number_of_files = count($_FILES['userfile']);
for ($i=0; $i < $number_of_files; $i++)
{
if ($_FILES['userfile']['size'] !== 0)
{
$namename= "$uartist[$i]-$usong[$i].mp3";
$file=$_FILES['userfile']['tmp_name'][$i];
if (move_uploaded_file($_FILES['userfile']['tmp_name'][$i], "/mp3/$namename"))
{
print "<tr><td>File $namename upload and rename succesful!</td></tr>";
}
}
else
{
print "<tr><td>You have to upload some files!</td></tr>";
}
}
antti
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php