php file upload question #2
Hello, fellow PHPers.
I've built an php application for my church group that has file upload feature. I confirmed it worked on Firefox on my mac. So I thought it would work on pretty much on every browsers. Well that was my downfall.
I had a couple of people upload their files via the application, and a couple somehow didn't succeed in doing so whereas some did. Most of the people in this group run Windows operating system, and their browser choices are IE and Firefox mostly. It turned out that people with Firefox on Windows are having problem with my application, but people with IE on Windows are having all the successes in uploading their files.
So I had a guy who was using Firefox on Windows use IE to upload his file, and it worked all fine without any problem.
Here's my partial upload code for the application.
I've never had any problems with non-IE browsers before, but this is definitely one. I hope some of you in this forum have insight that they want to share on this issue.
echo 'File xferd by HTTP.\n';
if(($_FILES["mp3"]["type"] == "audio/mpeg"))
if($_FILES["mp3"]["size"] < 10000000)
echo $_FILES["uploaded"]["name"].'이 업로드 되었습니다.\n';
echo 'The uploaded file size greater than 10Mb. Failed to upload the file.';
echo 'The uploaded file is not in mpeg format. Failed to upload the file.';
<form enctype="multipart/form-data" action="viewadd.php" method="post" accept-charset="utf-8">
<td><input type="file" name="mp3"></td>
<td colspan="2" align="center"><input type="submit" name="submitted" value="Submit"></td>
Any idea will be much appreciated.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)