I\'ve attempted to write code to have a file uploaded to a \"media\" folder in PHP. For some reason it continues to not work.
Here\'s the execution code:
<
Check in php.ini file max_execution_time heavy images are not uploaded due to execution time..
eg: ;
Make sure that in your form.. you put the enctype.
move_uploaded_file($file_tmp,"images/".$file_name);
echo "Success
I was having the same problem. I am using ubuntu 18.04 and it was solved when i used this permission command on terminal. sudo chmod -R 777 /var/www/html/target_dir. ->I have apache2 web server and target_dir as Download so replace target_dir as per your destination directory.