Hi, I am not sure if the is really the place for this question.
I am testing a website, it has a place for visitor to upload file, the snippet I got, (I forgot where come from,) works well on almost every browser, IE 6 and 7, Safari for Windows, FF 3 for Mac and Windows. But for some reasons it doesn’t work on Safari 3.1.1 for Mac. I am wondering if it happen to somebody else as well.
Here is the front end:
<form action=”upload.php” method=”post” ENCTYPE=”multipart/form-data”>
File: <input type=”file” name=”file” size=”30″>
<input type=”submit” value=”Upload!”>
</form>
and the back end:
<?php
// ==============
// Configuration
// ==============
$uploaddir = “uploads”;
// Where you want the files to upload to
//Important: Make sure this folders permissions (CHMOD) is 0777!
// ==============
// Upload Part
// ==============
if(is_uploaded_file($_FILES[‘file’][‘tmp_name’]))
{
move_uploaded_file($
print “Your file has been uploaded successfully! Yay!”;
}
else
{
print “Your file has not been uploaded! Pleas try again!”;
}
?>
If someone knows what happens and how to correct it, I will really appreciate it.