posto qui una discussione che ho aperto nel forum di flash, ed interessa anche php

http://forum.html.it/forum/showthrea...readid=1267839

sto cercando di fare un upload da flash tramite php, solo che la destinazione dell'upload deve essere sempre diversa e deve essere decisa da flash

ho provato anche con (flsah)
Codice PHP:
var sendMail:LoadVars = new LoadVars();
sendMail.destination_dir "./public/";
sendMail.onLoad = function(success){
if(
success){
    
trace(sendMail.destination_dir);
}
}
sendMail.sendAndLoad("upload_high_res.php"sendMail"POST"); 
ed in php
Codice PHP:
<?php // 4, compatibile 5.0 e 5.1

$destination_dir $_POST['destination_dir'];




if(
    
    isset(
$_FILES['Filedata']) &&
 
    
is_array($_FILES['Filedata']) &&
    ?
    isset(
        
$_FILES['Filedata']['tmp_name'],
        
$_FILES['Filedata']['name'],
        
$_FILES['Filedata']['size'],
        
$_FILES['Filedata']['error']
    ) &&
   
    
intVal($_FILES['Filedata']['error']) === 0
) {
     
    if(
move_uploaded_file($_FILES['Filedata']['tmp_name'], $destination_dir.$_FILES['Filedata']['name'])) {
  
    }
   
}
?>