php - multi-step form with file upload

前端 未结 3 1815
忘掉有多难
忘掉有多难 2021-01-20 18:19

I can\'t seem to find clarification. I have 7 steps and the second one is to upload a file. The problem I am having is that on the final step when I finalize the form and tr

3条回答
  •  误落风尘
    2021-01-20 18:54

    So do they mean I move it from the default temp folder into a temp folder I manage and then when they complete the form move it again to a final folder?

    Yes, exactly. You do the first move on the request that receives the files, because when that request is finished PHP would delete them if they still exist.

    See move_uploaded_fileDocs and Handling File Uploads.

提交回复
热议问题