Salve a tutti, nel mio hosting vorrei aggiunere l'anteprima dell'immagine hostata e sotto all'anteprima i dati dell'immagine.
il codice php è:
Codice PHP:
#-----------------------------------------------------------#
# this function will upload the files. :) ;) cool #
#-----------------------------------------------------------#
if (move_uploaded_file($file_tmp,$upload_dir.$file_name)) {
#-----------------------------------------------------------#
# this function will upload the files. :) ;) cool #
#-----------------------------------------------------------#
if (move_uploaded_file($file_tmp,$upload_dir.$file_name)) {
echo "File $i: [url='http://webhost.webarrivo.com/upload/$file_name']$file_name[/url] è stato uppato correttamente.
";
}else{
echo "File $i: upload fallito.
";
}#end of (move_uploaded_file).
}#end of (file_exists).
}#end of (file_size).
}#end of (limitedext).
}#end of (!is_uploaded_file).
}#end of (for loop).
# print back button.
echo "»<a href=\"$_SERVER[PHP_SELF]\">back</a>";
}else{
echo "File $i: upload fallito.
";
}#end of (move_uploaded_file).
}#end of (file_exists).
}#end of (file_size).
}#end of (limitedext).
}#end of (!is_uploaded_file).
}#end of (for loop).
# print back button.
echo "»<a href=\"$_SERVER[PHP_SELF]\">back</a>";
io devo modificare la riga
Codice PHP:
if (move_uploaded_file($file_tmp,$upload_dir.$file_name)) {
echo "File $i: [url='http://webhost.webarrivo.com/upload/$file_name']$file_name[/url] è stato uppato correttamente.
";
e mettere
e sotto:
Codice PHP:
list($width, $height, $type, $attr) = getimagesize("../percorso.gif");
echo "Larghezza: " .$width. "
";
echo "Altezza: " .$height. "
":
echo "Dimensione: " .filesize("http://webhost.webarrivo.com/upload/$file_name");
e ovviamente tutto sotto tabella, e il codice in php a me verrebbe fuori:
Codice PHP:
#-----------------------------------------------------------#
# this function will upload the files. :) ;) cool #
#-----------------------------------------------------------#
if (move_uploaded_file($file_tmp,$upload_dir.$file_name)) {
#-----------------------------------------------------------#
# this function will upload the files. :) ;) cool #
#-----------------------------------------------------------#
if (move_uploaded_file($file_tmp,$upload_dir.$file_name)) {
echo "File $i: [url='http://webhost.webarrivo.com/upload/$file_name']$file_name[/url] è stato uppato correttamente.
";
echo "<table class='boot' valign="top" style="border: 0px none ; background-color:#3399FF; background-image:url('boot.gif'); height:6"> [img]http://webhost.webarrivo.com/upload/$file_name[/img]
list($width, $height, $type, $attr) = getimagesize("../percorso.gif");
echo "Larghezza: " .$width. "
";
echo "Altezza: " .$height. "
":
echo "Dimensione: " .filesize("http://webhost.webarrivo.com/upload/$file_name")</table>";
}else{
echo "File $i: upload fallito.
";
}#end of (move_uploaded_file).
}#end of (file_exists).
}#end of (file_size).
}#end of (limitedext).
}#end of (!is_uploaded_file).
}#end of (for loop).
# print back button.
echo "»<a href=\"$_SERVER[PHP_SELF]\">back</a>";
}else{
echo "File $i: upload fallito.
";
}#end of (move_uploaded_file).
}#end of (file_exists).
}#end of (file_size).
}#end of (limitedext).
}#end of (!is_uploaded_file).
}#end of (for loop).
# print back button.
echo "»<a href=\"$_SERVER[PHP_SELF]\">back</a>";
Mi sapete dire dove è l'errore? grazie ^^