我的控制器就像这样
function uploaded_photo_post(){
$tempFile = $_FILES['file']['tmp_name'];
$targetFile = $_FILES['file']['name'];
$folder_name_member = self::createFolderMember($this->member_id);
$targetFile = UPLOAD_DIR . 'members/'. $folder_name_member . '/temps/'. $targetFile;
move_uploaded_file($tempFile,$targetFile); //send file to path forder
}
我的表格:
<form id="my-awesome-dropzone" method="post" action="/member/uploaded_photo"class="dropzone">
<div class="fallback"> <!-- this is the fallback if JS isn't working -->
<input name="file" type="file" multiple />
</div>
</form>
那么如何将文件名路径返回到表单中。有时候,如果用户不想选择该图像,那么我想将所有路径名发送到表单。 谢谢你们