I can upload other file without error. But whenever I tried to upload rtf file in php it fails. My code it below:
if(isset($_POST['pid'])){
if($_FILES['uploadname']['name']==''){
//Failed
}else{
//upload the file
}
}
HTML form:
<form method="post" enctype="multipart/form-data">
<input type="file" accept=".csv,.doc,.pdf,.docx,.xls,.xlsx,.rtf,.txt, image/*"
name="uploadname" style="width:100%;">
<input type="hidden" name="pid" value="<?php echo $id; ?>">
<input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $max; ?>">
</form>
$max = 62914560 bytes
I got undefined index uploadname
The server log:
PHP Warning: POST Content-Length of 24783980 bytes exceeds the limit of 8388608 bytes in Unknown on line 0
I upload the same file (resaved as doc format using msword) without problem. But when it comes to rtf it fails. I can upload other files like doc, docx, xls, xlsx, pdf, txt and all image files without problem. What could be the problem. I am using php 7.1.19 Thanks