Ho trovato in giro sul web un'applet java che permette di fare l'upload di tutti i file presenti in una cartella.
Vi rimando al sito:
http://jumploader.com/index.html
Ho provato ad implementarlo nel mio sito e non andava.Allora ho provato la pagina html che loro mettono a disposizione x provare.
Il codice contenuto è questo:
Che rimanda alla pagina phpCodice:<html> <head> <title>File upload form</title> </head> <body> <h1>Upload form</h1> <form name="mainForm" method="post" enctype="multipart/form-data" action="uploadHandler.php?test=y" > <input type="hidden" name="hiddenParameter" value="123"> <p>File: <input type="file" name="file"></p> <p><input type="submit"></p> </form> </body> </html>
Quando provo a fare l'upload di un file, però, mi diceCodice:<?php //---------------------------------------------- // upload file handler script //---------------------------------------------- // // specify file parameter name $file_param_name = 'file'; // // retrieve uploaded file name $file_name = $_FILES[ $file_param_name ][ 'name' ]; // // retrieve uploaded file path (temporary stored by php engine) $source_file_path = $_FILES[ $file_param_name ][ 'tmp_name' ]; // // construct target file path (desired location of uploaded file) - // here we put to the web server document root (i.e. '/home/wwwroot') // using user supplied file name $target_file_path = $_SERVER[ 'DOCUMENT_ROOT' ] . "/" . $file_name; // // move uploaded file echo "Moving file " . $source_file_path . " > " . $target_file_path . ": "; if( move_uploaded_file( $source_file_path, $target_file_path ) ) { echo "success"; } else{ echo "failure"; } // // below is trace of variables ?> <html> <body> <h1>GET content</h1> <pre><?print_r( $_GET );?></pre> <h1>POST content</h1> <pre><?print_r( $_POST );?></pre> <h1>FILES content</h1> <pre><?print_r( $_FILES );?></pre> </body>
Se volete potete provare "http://www.lifedj.altervista.org/provajava/uploadForm.html".Codice:Moving file /membri/.dummy/temp/php0tLSEW > /var/www/html/key.txt: failure GET content Array ( [test] => y ) POST content Array ( [hiddenParameter] => 123 ) FILES content Array ( [file] => Array ( [name] => key.txt [type] => text/plain [tmp_name] => /membri/.dummy/temp/php0tLSEW [error] => 0 [size] => 63 ) )
Cos'è ke nn va?
Vi ringrazio in anticipo.Lifedj

LinkBack URL
About LinkBacks
