FLASH PHP uploading images problem

Hi Everyone,

I am trying to upload an image on my server using Flash and PHP. The following code works fine on 1 server but doesn’t work on other 2 servers where i have to implement it. Please check it and see where am i going wrong.
FLA CODE:


**listener.onSelect = function(selectedFile:FileReference):Void {

// Flash is attempting to upload the image.
statusArea.text += "Wait…trying to upload " + selectedFile.name + "
";

selectedFile.upload(“upload.php”);

};**

PHP CODE:

**<?php
$target = “./”;
$target = $target . $_FILES[‘Filedata’][‘name’];
move_uploaded_file($_FILES[‘Filedata’][‘tmp_name’], $target);
chmod("./".$_FILES[‘Filedata’][‘name’], 777);
?>
**

The other 2 servers shows that it is uploading but doesn’t upload. Not sure if flash is executing PHP file on those.
I am really struggling to make it work on other servers. I just cldn’t understand the logic that why does it just work on one server and not others. Any kind of help will be highly appreciated.

Thank You.

And one more thing. I have
listener.onComplete also in my flash code which shows it has “uploaded”.

And one of the two non-working servers even executes that. But the other doesn’t come in listener.onComplete.