sono alla conclusione che queste classi funzionano per miracolo e solo se usate in questa sequenza, perchè quello che leggo nella guidata it.php.net è vero

Codice PHP:
Darrell
18
-May-2005 11:51 
move_uploaded_file apparently uses the root of the Apache installation 
(e.g"Apache Group\Apache2" under Windows) as the upload location if relative pathnames are used.

For 
example
$ftmp $_FILES['userfile']['tmp_name'];
$fname $_FILES['userfile']['name'];
move_uploaded_file($ftmp$fname);
                           
moves the file to 
"Apache Group\Apache2\$fname";

In contrastother file/directory related functions use the current directory of the php script as the offset for relative pathnames.  So, for example, if the command

mkdir
('tmp');

is called from 'Apache Group\Apache2\htdocs\testpages\upload.php'the result is to create
'Apache Group\Apache2\htdocs\testpages\tmp'

On the other hand, if 'mkdir' is called just before 'move_uploaded_file'the behavior changes.  The commands

mkdir('tmp');
move_uploaded_file($ftmp$fname);

used together result in 

"Apache Group\Apache2\htdocs\testpages\tmp\$fname"

being created.  Wonder if this is a bug or a feature.

Darrell