Today, I added a file upload function to the website backend. As a result, a BUG appeared, prompting that the upload file was not selected. .
The following is the code part.
<form method="post" action="attached.php?action=upload_post" enctype="multipart/form-data"> <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tr> <td><input type="file" name="attaFile" id="attaFile" /> </tr> <tr> <td valign="bottom" height="50"><button type="submit" id="attaBtn">确定</button></td> </tr> </table> </form>
After checking the code for a long time, I felt that there was no problem with the code. I changed name="attaFile" to name="attafile" with the attitude of giving it a try, that is, changing the uppercase F to lowercase, and the upload was successful.
I wasted half a day on this problem. I was also drunk. I don’t know if it is an SAE problem or if it is the same on all servers.
The above is the entire content of this article, I hope you all like it.