< ? php
$UPLOADPATH="data/";
try{
if ( 0 < $_FILES['file']['error'] ) {
echo 'Error: ' . $_FILES['file']['error'] . '
';
}
else {
move_uploaded_file($_FILES['file']['tmp_name'], $UPLOADPATH .$_FILES['file']['name']);
}
$filename=$_FILES['file']['name'];
$dis=$UPLOADPATH.$filename;
if($dis=="")
echo "file does not exist";
else {
echo '';
}
}catch(exception $e){
echo "false";
}
echo "file uploaded";
?>