File not uploading PHP

后端 未结 9 1551
后悔当初
后悔当初 2020-11-27 23:09

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:

<         


        
相关标签:
9条回答
  • 2020-11-27 23:46

    Check in php.ini file max_execution_time heavy images are not uploaded due to execution time..

    eg: ;

    0 讨论(0)
  • 2020-11-27 23:48

    Make sure that in your form.. you put the enctype.

    move_uploaded_file($file_tmp,"images/".$file_name);
    echo "Success
    
    0 讨论(0)
  • 2020-11-27 23:49

    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.

    0 讨论(0)
提交回复
热议问题