如何在文件上传的代码未定义索引中使用move_upload文件功能?

时间:2019-07-20 07:17:57

标签: php

我是php和mysql的新手,想通过三个输入来上传文件,也将上传文件移到我的项目文件夹中。这是我的代码。

   if(isset($_POST['submit']))


    $birthcertificate  = $_FILES['file1']['name'];  
    $temp_name  = $_FILES['file1']['tmp_name'];  
    if(isset($birthcertificate)){
        if(!empty($birthcertificate)){      
            $location = '.images/';      
            if(move_uploaded_file($temp_name, $location.$birthcertificate)){
                echo 'File uploaded successfully';
            }
        }       
    }  else {
        echo 'You should select a file to upload !!';
    }

$sql = "insert into tabel(......)values($birh..,$pclaa..,$transfer..);

错误:

  

move_upload文件中的未定义索引和警告

0 个答案:

没有答案