How to define the file storage location in PHP FILE UPLOAD

后端 未结 2 1069
-上瘾入骨i
-上瘾入骨i 2021-01-22 14:17

In the following script I tried uploading file to tmp folder in htdocs but the file is not moving to that location. How do I define the storage location?



        
2条回答
  •  离开以前
    2021-01-22 14:58

    well the code you posted isn't moving any file. You miss

    move_uploaded_file ( $_FILES["file"]["tmp_name"][$key], 'C:\xampp\htdocs\tmp\new_file.txt' );
    

    http://php.net/manual/en/function.move-uploaded-file.php

提交回复
热议问题