Jump to content

new flash.net.FileReference()


Recommended Posts

Hi ,Need some help please ?


trying to upload image with file upload to server,the code looks like this.....


file.upload("upload.php?fln=" + _root._tempimageFileName[0])


need some help writing the upload.php script to receive  fln=" + _root._tempimageFileName[0]....


My upload.php looks like this .....



// Variable (name) sent from Flash
$filename = $_FILES['Filedata']['name'];
// the uploaded file save as a temporary file on the web server 
$filetmpname = $_FILES['Filedata']['tmp_name'];
/* You can return the File Type and File Size back to Flash if you like*/
//$fileType = $_FILES["Filedata"]["type"];
//$fileSizeMB = ($_FILES["Filedata"]["size"] / 1024 / 1000);
// Path the file will be moved to 
$destination_path = "images/";
// Path and file the file will be moved to 
$destination_path = $destination_path . $filename;
// Call the move_uploaded_file function to move the file
// The move_uploaded_file function requires two parameters:
// - path of the temporary file 
// - path where the file will be moved to 
if ( move_uploaded_file($filetmpname, $destination_path) ) {
// move_uploaded_file returns true if the uploaded file was moved successfully,
echo "OK";
} else {
echo "FAIL";
thanks in advance for any help!!
Link to comment
Share on other sites

This thread is more than a year old. Are you sure you have something important to add to it?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.