这里我想用水标记多个文件上传,我不知道如何在我的上传图片中添加水印文字(WELCOME),截至目前我做了多个文件上传,在php代码中如何添加水印文字,如果有人知道,请更新我的代码,
Parent
$("#rentBtnSubmit").click(function(e){
e.preventDefault();
var formData = new FormData();
var formData = new FormData($('#rentForm')[0]);
formData.append('file[]', $('input[type=file]')[0].files[0]);
$.ajax({
type:'POST',
url :"test.php",
data: formData,
cache: false,
contentType: false,
processData: false,
success: function(data) {
if(data['status'] =='success'){
alert('Success');
}
else{
alert('Error');
}
},
error:function(exception){
$("#rentError").show();
$("#rentError").fadeOut(4000);
}
});
});
test.php的
<form id="rentForm">
<div class="row">
<div class="col-md-12">
<div class="form-group">
<label class="control-label">Upload Property Photo</label>
<br>
<div id="maindiv">
<div id="formdiv">
<span id="filediv col-md-3"><input name="file[]" type="file" id="file" multiple=""/></span>
</div>
</div>
</div>
</div>
</div><br><br>
<button type="button center-block" id="rentBtnSubmit">Submit</button>
</form>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>