the move_uploaded_file value is 1, it will echo thanks but i got no file on my directory. here my code:
if (isset($_POST['bt_upload']))
{
$kat=$_POST['cbkat'];
$tipe=$_POST['cbtype'];
$judul=$_POST['judul'];
$file=$_FILES['userfile']['name'];
$filetemp=$_FILES['userfile']['tmp_name'];
$uploaddir="/"; // "/file/uploaddir/";
if (move_uploaded_file($filetemp,$uploaddir.$file))
{
echo "Thanks-<br> ";
print_r($_FILES);
}
else
{
echo "failed";
print_r($_FILES);
}
}
i thinks the prob in my $uploaddir, first, when i set it as "/file/uploaddir/", it echo failed. when i change to "/", it echo thanks (m_u_f success) but no file coming...
here the result of my print_r($_FILES) //success or failed it prints :
Array ( [userfile] => Array ( [name] => PHYSICS LECTURE NOTES PHYS 395 ELECTRONICS.htm [type] => text/plain [tmp_name] => C:\WINDOWS\TEMP\php7E.tmp [error] => 0 [size] => 36546 ) )
--- can anyone tell me why it's failed, both when my $uploaddir is set with "/" and "/file/uploaddir";
and how to get it works of course..
THANK YOU very much