Php Lovers,
Do we use the is_uploaded_file before the move_uploaded_file or is it the other way round ?
So far, i got it like this:
[code]
if(!is_uploaded_file($file_tmp)) die(“Error 5a: Your file failed to upload via HTTP POST! Try some other time.”);
if(!move_uploaded_file($file_tmp, “$directory_path/$user/$file_name”)) die(“Error 5b: Your file failed to upload! Try some other time.”);
else
{
move_uploaded_file($file_tmp, “$directory_path/$user/$file_name”); //WHY IS NOT THIS LINE OF CODE MOVING THE FILE TO DESTINATION ?
//Notify user their Id Verification Video File was uploaded successfully.
echo “Your Video File “$file_name” has been uploaded successfully!”;
exit();
}
I see no difference if I get it the other way round. However, which is correct method ?
Got introduced to the is_uploaded_file here: