0

Hello everybody i am upload image using php file uploader code provided at w3schools and it is uploading the images but when i upload swf file it will give me errors... i dont know why this is happening any suggestions...

Much Obliged

3
Contributors
3
Replies
5
Views
6 Years
Discussion Span
Last Post by Arkinder
0

yes Shanti C i am with in these limits; here is my server side code

move_uploaded_file($_FILES["myfile"]["tmp_name"],
      "upload/" . $_FILES["myfile"]["name"]);

	echo $_FILES['myfile']['name'];

when i upload an image of jpg/png it will upload it but in case of swf file it doesn't
Much Obliged

1

The script w3schools offers is limited to image file types only. Add the flash file type and it should work.

if ((($_FILES["file"]["type"] == "image/gif")
|| ($_FILES["file"]["type"] == "image/jpeg")
|| ($_FILES["file"]["type"] == "image/pjpeg")
|| ($_FILES["file"]["type"] == "application/x-shockwave-flash"))
&& ($_FILES["file"]["size"] < 20000))

Regards
Arkinder

Edited by Arkinder: n/a

Votes + Comments
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.