Home  >  Article  >  php教程  >  通过form表单上传文件(APP 客户端服务器)

通过form表单上传文件(APP 客户端服务器)

PHP中文网
PHP中文网Original
2016-05-20 12:58:151154browse


if(isset($_FILES['image1'])) {
        $fileArray1 = $_FILES['image1'];
        $temp_name1 = $fileArray1['tmp_name'];
        $file_name1 = $fileArray1['name'];
        $file_name1_old = '../uploadimg/article_schedule/'.$param_user_id.'-'.time().'-'.$index.'-'.$file_name1;
        $file_name1_new = '..'.$request_uri.'uploadimg/article_schedule/'.$param_user_id.'-'.time().'-'.$index.'-'.$file_name1;
        move_uploaded_file($temp_name1,$file_name1_old);
        array_push($image_info_list,$file_name1_new);
    }

                   

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn