$file_name = $_FILES['img']['name'];
$file_tmp = $_FILES['img']['tmp_name'];
$img_hash = time()."_".rand(1000, 9999)."_".$file_name;
// move_uploaded_file($_FILES['img']['tmp_name'], $file_name);
if (move_uploaded_file($file_tmp," ../user/user_img/".$img_hash)) {
echo "File is valid, and was successfully uploaded.\n";
} else {
echo "Upload failed";
}
ini_set('error_reporting',E_ALL);
ini_set('display_errors', 1);