I am uploading a file through PHP scipt ..
my code is
$file_temp=$_FILES["upl"]["tmp_name"];
when i upload stuffs with
move_upload_file($file_temp,"user_stuff/".$file_name)
Everything works fine .. stuff get uploaded with no disaster
But when i check the uploaded file to be actually in the area using
is_uploaded_file($file_temp);
It always return false
So i googled the problem and it redirected me to the same stackoverflow problem here
so i did , as it was suggested
if(is_uploaded_file(realpath($file_temp)))
{
echo "done";
}
else
{
echo "fail";
}
But still getting the same problem "fail"
Moreover, i just noticed a strange thing ... when i am not using move_uploaded_file(..) , the is_uploaded_file "works"
try sudo chmod 777 path_to_directory/user_stuff/ -R in your console
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With