Files more than 50 KB are not uploading. I have checked php.ini and i have following values
post_max_size = 16M (which i have increased from 3 MB but still no luck)
upload_max_filesize = 64M
max_file_uploads = 20
I've tried and read everything, couldn't find a solution, if anyone has gone thru the same problem, please share your experience.
PHP:
if(isset($_FILES["file"]))
{
if($_FILES["file"]["error"] == 0)
{
$uploaded_file_name = $_FILES["file"]["name"];
move_uploaded_file($_FILES["file"]['tmp_name'], __DIR__ . "/" . $uploaded_file_name);
exit;
}
}
HTML:
<form action="<?php $_SERVER["PHP_SELF"] ?>" method="post" enctype="multipart/form-data">
<label for="file">Filename:</label>
<input type="file" name="file" id="file"><br>
<input type="submit" name="submit" value="Submit">
</form>
The post_max_size must be equal or greater than upload_file_size
Example