PHP File Upload Creating Directory

后端 未结 3 1660
广开言路
广开言路 2021-01-25 14:52

So I have a file upload portion on my website where the user can upload any doc or docx folder. Heres my html code:

3条回答
  •  余生分开走
    2021-01-25 15:32

    You need to check if the directory exists, and if not, create it.

    if (!file_exists("Proposals/". $_SESSION["FirstName"])) {
          mkdir("Proposals/". $_SESSION["FirstName"]);
    }
    

提交回复
热议问题