Hi there,
I am pretty sure that it worked before. But now, neither on my local machine, nor on the server, it does what it is supposed to do: uploading a simple text file.
Code is as follows:
and
So, really nothing fancy, and took it from some PHP tutorial pages.
Can anyone tell me why "Size: 0 Kb"?
Thanks for any hints.
I am pretty sure that it worked before. But now, neither on my local machine, nor on the server, it does what it is supposed to do: uploading a simple text file.
Code is as follows:
Code:
<form action="upload_CDIAC.php" method="post" enctype="multipart/form-data"> <label for="file">Filename:</label> <input type="file" name="file" id="file" /> <input type="submit" name="submit" value="Submit" /> </form>
Code:
if ($_FILES["userfile"]["error"] > 0)
{
echo "Error: " . $_FILES["userfile"]["error"] . "<br />";
}
else
{
echo "Upload: " . $_FILES["userfile"]["name"] . "<br />";
echo "Type: " . $_FILES["userfile"]["type"] . "<br />";
echo "Size: " . ($_FILES["userfile"]["size"] / 1024) . " Kb<br />";
echo "Stored in: " . $_FILES["userfile"]["tmp_name"];
}
Can anyone tell me why "Size: 0 Kb"?
Thanks for any hints.
Comment