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:
Expand|Select|Wrap|Line Numbers
- <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>
Expand|Select|Wrap|Line Numbers
- 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.